- A doubly linked list having exactly one of the node pointing to a random node in list, correct the doubly linked list.
- Build a Hashmap like data structure which can scale up and down – interviewer was looking for a method where we dont have to rehash all items in map upon increasing the size, can use consistent hashing with buckets
- Difference between Semahore and Mutex, ACID properties
- next larger palindromic number of a given number
- given array of arrivals and departure times, find the max no. of available car at any moment
Solution : just merge arrivals and departure time in an array and maintain arrival or departure flag for each time, now sort the merged array and for every arrival increase the count, and for every departure decrease the count and maintain max count.
- there is a circle, A flight with full capacity x can travel upto half way of circle. How many extra flight you would need to help the first flight to complete the circle. You can use as many flight as you want. Any helping flight must have enough fuel to come back to origin i.e a flight can travel only 1/4 of the circle and come back. Flight can go in any direction and can be reused. (answer is 2).
- producer and consumer using wait and notify, production ready code.
- current projects, how does kafka work?
- spiral printing of matrix
- a robot either can climb one step or two step, so, find out how many ways he can climb n step. – f(n) = f(n-1) + f(n-2)
- Write database pool class which will make sure connection is acquired and released upon execution of query.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.