Nutanix
Infineon Technologies Interview Questions and Answers
Q1. Link up all nodes present in same level of BST using next pointer
The question asks to link up all nodes present in the same level of a binary search tree using the next pointer.
Traverse the tree level by level using a queue
For each level, create a linked list by connecting the nodes using the next pointer
Use a dummy node to keep track of the start of the linked list for each level
Q2. Give the length of longest absolute directory path string Discuss the DS used Optimize it
The question asks for the length of the longest absolute directory path string and how to optimize it.
Use a depth-first search (DFS) algorithm to traverse the directory structure
Maintain a stack to keep track of the current path length
Keep updating the maximum path length encountered
Consider the length of each directory/file name and the length of the path separators
Q3. Design a system to find the millionth person liking particular comment. Many constraints
Design a system to find the millionth person liking a particular comment.
Use a database to store the likes for each comment
Implement a counter to keep track of the number of likes for each comment
Use a caching mechanism to improve performance
Consider sharding or partitioning the data for scalability
Implement a search algorithm to find the millionth person
Q4. Design Thread Safe implementation of HashMap
Design a thread-safe implementation of HashMap.
Use synchronized methods or locks to ensure mutual exclusion.
Consider using ConcurrentHashMap instead of HashMap.
Use volatile keyword for variables accessed by multiple threads.
Avoid using iterators as they may cause ConcurrentModificationException.
Use atomic operations for read-modify-write operations.
Consider using immutable keys to avoid synchronization issues.
Q5. Debuggng a code of Dining Philosopher Problem
Debugging a code of Dining Philosopher Problem
Check for deadlock conditions
Ensure that each philosopher can only pick up two forks at a time
Implement a solution using semaphores or monitors
Consider using a timeout mechanism to prevent deadlock
Test the code with different scenarios to identify and fix any issues
Q6. what happens when you search google
When you search Google, it retrieves relevant information from its index and displays results based on the search query.
Google retrieves information from its index of web pages
Results are displayed based on relevance to the search query
Search results may include websites, images, videos, news articles, and more
Q7. Design a URL Shortener
A URL shortener is a tool that takes a long URL and creates a shorter, easier-to-share link.
Generate a unique short code for each URL
Store the short code and original URL in a database
Redirect users from the short URL to the original URL
Track clicks and analytics for each short URL
More about working at Nutanix
Interview Process at Infineon Technologies
Top Member Technical Staff Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month