Oracle
Designnex Technologies Interview Questions and Answers
Q1. Design of vendee machine design patterns
Vending machine design patterns involve creating efficient and user-friendly interfaces for purchasing products.
Consider using the Factory Method pattern to create different types of vending machines.
Implement the State pattern to manage the different states of the vending machine (e.g. idle, dispensing, out of stock).
Use the Observer pattern to notify the vending machine when products are restocked or when a purchase is made.
Apply the Strategy pattern to allow for different ...read more
Q2. Last k node from end of linked list
To find the last k nodes from the end of a linked list, we can use a two-pointer approach.
Use two pointers, one starting at the head of the linked list and the other starting k nodes ahead.
Move both pointers simultaneously until the second pointer reaches the end of the linked list.
The first pointer will now be at the kth node from the end.
Q3. Most common element in a string
The most common element in a string is the character that appears the most frequently.
Use a hashmap to store the frequency of each character in the string
Iterate through the string and update the frequency count in the hashmap
Find the character with the highest frequency in the hashmap
Q4. Middle of single linked list
To find the middle of a single linked list, use two pointers - one moving twice as fast as the other.
Use two pointers - slow and fast
Move slow pointer by one node and fast pointer by two nodes
When fast pointer reaches end, slow pointer will be at the middle
Q5. Intersection of linked list
Intersection of linked list is finding the common node(s) between two linked lists.
Traverse both linked lists and store nodes in a set, then check for common nodes
Use two pointers approach to find the intersection point
If one list is longer, move the pointer of the longer list to the same distance from the end as the shorter list
Q6. Design facebook
Facebook is a social media platform that allows users to connect, share content, and communicate with others.
User registration and login system
Profile creation and customization
News feed algorithm to display relevant content
Friendship system to connect users
Messaging and chat functionality
Content sharing (posts, photos, videos)
Privacy settings and controls
Notifications and activity tracking
Advertising and monetization strategies
More about working at Oracle
Interview Process at Designnex Technologies
Reviews
Interviews
Salaries
Users/Month