Add office photos
Employer?
Claim Account for FREE

Arista Networks

4.2
based on 77 Reviews
Filter interviews by

20+ ICICI Lombard General Insurance Company Interview Questions and Answers

Updated 21 Jan 2025

Q1. Why we use trie and its advantages and dis-advantages

Ans.

Trie is a tree data structure used for efficient retrieval of key-value pairs, commonly used in autocomplete and spell check applications.

  • Advantages: efficient prefix search, space optimization for storing keys with common prefixes, easy to implement autocomplete and spell check functionalities

  • Disadvantages: can be memory intensive for large datasets, complex to implement compared to other data structures like hash tables

  • Example: Trie data structure is commonly used in search...read more

Add your answer

Q2. What are double pointers ?

Ans.

Double pointers are pointers that store the memory address of another pointer.

  • Double pointers are used in C and C++ to store the address of a pointer variable.

  • They are commonly used in functions to modify the value of a pointer passed as an argument.

  • Example: int **ptr; // declares a double pointer to an integer pointer.

Add your answer

Q3. Running median in stream

Ans.

Calculate the running median of a stream of numbers.

  • Use two heaps - a max heap for the smaller half of the numbers and a min heap for the larger half.

  • Keep the heaps balanced by ensuring the size difference is at most 1.

  • If the heaps are balanced, the median is the average of the top elements of the two heaps. Otherwise, it is the top element of the larger heap.

Add your answer

Q4. Discuss OOPS in Programming.

Ans.

OOPS stands for Object-Oriented Programming, a programming paradigm based on the concept of objects.

  • OOPS focuses on creating objects that contain both data and methods to manipulate that data.

  • Encapsulation, inheritance, and polymorphism are key principles of OOPS.

  • Example: Inheritance allows a class to inherit properties and methods from another class, promoting code reusability.

Add your answer
Discover ICICI Lombard General Insurance Company interview dos and don'ts from real experiences

Q5. Design LRU cache

Ans.

Design a data structure for LRU cache with get and put operations, evicting least recently used item when capacity is reached.

  • Implement a doubly linked list to keep track of the order of keys based on their usage

  • Use a hashmap to store key-value pairs for quick access

  • Update the order of keys in the linked list when a key is accessed or inserted

  • Evict the least recently used item when the cache reaches its capacity

Add your answer

Q6. In a todo application a user's data is supposed to be synced in multiple devices. When there is a change made in the todo list in one device, the other device's UI needs to update without refresh. How would you...

read more
Ans.

Real-time synchronization of todo list across multiple devices using short polling and web sockets.

  • Implement short polling to regularly check for updates on the server and update the UI accordingly.

  • Use web sockets for real-time communication between devices to instantly push updates to all connected clients.

  • Maintain a centralized database to store and retrieve the todo list data for all devices.

  • Utilize a messaging queue system to ensure reliable and ordered delivery of update...read more

Add your answer
Are these interview questions helpful?

Q7. Design a ticket booking platform(Core problem: How would you prevent concurrent ticket booking by multiple users)

Ans.

Implement session locking to prevent concurrent ticket booking by multiple users.

  • Implement session locking mechanism to ensure only one user can book tickets at a time.

  • Use a unique session ID for each user to track their booking process.

  • Lock the session when a user starts booking tickets and release the lock once the booking is completed.

  • Display a message to other users trying to book tickets if the session is already locked.

  • Use server-side validation to prevent users from by...read more

Add your answer

Q8. Find the memory of the given structure (Struct padding is the hint)

Ans.

The question asks to find the memory of a given structure by considering struct padding.

  • Struct padding refers to the unused bytes added to align the members of a structure.

  • To find the memory of a structure, we need to consider the size of each member and the padding added.

  • The total memory of a structure is the sum of the sizes of its members and the padding.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Write code to find the position of a number in a BST

Ans.

Code to find the position of a number in a BST

  • Implement a recursive function to traverse the BST

  • Compare the target number with the current node value

  • If the target is smaller, go to the left subtree; if larger, go to the right subtree

  • Repeat until the target is found or the subtree is null

Add your answer

Q10. Create a Trie data structure and perform insertion and search on it.

Ans.

A Trie is a tree-like data structure used for efficient retrieval of strings. It supports insertion and search operations.

  • A Trie is also known as a prefix tree.

  • Each node in the Trie represents a character.

  • The root node represents an empty string.

  • Each node can have multiple children, each representing a different character.

  • Insertion involves traversing the Trie and creating new nodes as needed.

  • Search involves traversing the Trie and checking if the desired string exists.

  • Tries ...read more

Add your answer

Q11. A string contains parenthesis, curly brackets and square brackets. Check if the string is valid or not.

Ans.

Check if a string containing parenthesis, curly brackets, and square brackets is valid.

  • Use a stack to keep track of opening brackets

  • Pop from stack when encountering a closing bracket, ensuring it matches the corresponding opening bracket

  • Return false if stack is not empty at the end

Add your answer

Q12. Check if the linked list is palindrome or not

Ans.

To check if a linked list is a palindrome, compare the first half of the list with the reversed second half.

  • Traverse the linked list to find the middle node

  • Reverse the second half of the linked list

  • Compare the first half with the reversed second half to check for palindrome

Add your answer

Q13. Design a routing table with insert delete and forward functionality. Define its class also

Ans.

Design a routing table with insert, delete, and forward functionality in a defined class.

  • Create a class called RoutingTable with methods for insert, delete, and forward

  • Use a data structure like a hash table or tree to store routing information

  • Implement insert method to add new routes, delete method to remove routes, and forward method to look up and forward packets

Add your answer

Q14. Internal working of Hashmap in c C++ debugging the code

Ans.

Hashmap in C/C++ stores key-value pairs using a hash function for fast retrieval.

  • Hashmap uses a hash function to map keys to indices in an array.

  • Collision handling is done using techniques like chaining or open addressing.

  • Hashmap allows for fast insertion, deletion, and lookup of key-value pairs.

  • Example: std::unordered_map in C++ implements a hashmap.

  • Debugging hashmap code involves checking hash function, collision resolution, and data retrieval.

Add your answer

Q15. how does packet travel in switch network

Ans.

Packets travel in a switch network by being forwarded based on the destination MAC address.

  • Packets are received by the switch on an incoming port.

  • The switch looks up the destination MAC address in its MAC address table.

  • If the MAC address is found, the packet is forwarded out the corresponding port.

  • If the MAC address is not found, the packet is flooded out all ports except the incoming port.

  • Switches operate at Layer 2 of the OSI model.

Add your answer

Q16. Design google contacts

Ans.

Google Contacts is a web-based address book application.

  • Users can add, edit, and delete contacts

  • Contacts can be organized into groups

  • Users can import and export contacts

  • Contacts can be searched and filtered

  • Integration with other Google services like Gmail and Calendar

Add your answer

Q17. is Linkedlist palindrome or not

Ans.

A Linkedlist is not inherently a palindrome, but it can be checked for palindrome by comparing the elements from both ends.

  • To check if a Linkedlist is a palindrome, we can reverse the second half of the list and compare it with the first half.

  • Alternatively, we can use a stack to store the first half of the list and then compare it with the second half while popping elements from the stack.

  • For example, if the Linkedlist is '1 -> 2 -> 3 -> 2 -> 1', it is a palindrome.

Add your answer

Q18. Find cycle in linked list

Ans.

Use Floyd's Tortoise and Hare algorithm to detect cycle in a linked list.

  • Initialize two pointers, slow and fast, at the head of the linked list.

  • Move slow pointer by one step and fast pointer by two steps.

  • If they meet at any point, there is a cycle in the linked list.

  • If fast pointer reaches the end of the list, there is no cycle.

Add your answer

Q19. String compare using char pointers

Ans.

Comparing two strings using char pointers in C/C++

  • Use char pointers to iterate through each character of the strings

  • Compare characters at each position until a difference is found

  • Return 0 if strings are equal, -1 if first string is less than second, 1 if first string is greater

Add your answer

Q20. High level design of a cache

Ans.

A cache is a high-speed data storage layer that stores a subset of data, typically transient in nature, so that future requests for that data are served faster.

  • Define the cache size and eviction policy

  • Choose a suitable data structure for the cache (e.g. hashmap, linked list)

  • Implement methods for adding, retrieving, and removing data from the cache

  • Consider concurrency control mechanisms to handle multiple access to the cache

  • Optimize cache performance by using techniques like c...read more

Add your answer

Q21. Memcpy implementation

Add your answer

Q22. Implement Hash Maps

Ans.

Hash maps are data structures that store key-value pairs and provide efficient lookup, insertion, and deletion operations.

  • Hash maps use a hash function to convert keys into array indices.

  • Collisions can occur when multiple keys hash to the same index, requiring collision resolution techniques.

  • Common collision resolution methods include chaining and open addressing.

  • Hash maps have an average time complexity of O(1) for basic operations.

  • Examples of hash maps include Python's dict...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at ICICI Lombard General Insurance Company

based on 33 interviews
Interview experience
4.2
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.5
 • 2.1k Interview Questions
3.7
 • 395 Interview Questions
3.3
 • 308 Interview Questions
4.0
 • 240 Interview Questions
3.8
 • 181 Interview Questions
3.7
 • 139 Interview Questions
View all
Top Arista Networks Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter