I went through all the concepts taught by Coding Ninjas in my course. Apart from that, I practiced 600+ coding interview questions from different coding platforms. Though Data Structure is the base for any tech interview, one must know some other subjects as well like Operating System, Networking, and Database Management System for which I took help from Coding Ninja’s notes and from GeeksforGeeks. Along with this stuff, I also read about puzzles on GeeksForGeeks. Overall, Coding Ninjas & Geeks For Geeks have a big hand in making me crack this interview. Just work hard and practice more and more questions based on Data Structures from coding platforms like Codezen etc.
Keep your resume up to date and mention three or four good level projects which will give a good impression to the interviewer .
This was MCQ +Coding round. There were 2 coding questions and around 5 MCQ’s. Coding Questions were pretty fair and have an appropriate level.
Multiple Choice Questions were based on aptitude, time complexity, and Data structures.
Check if any two intervals overlap among a given set of intervals. An interval is given in form of start and end time. Given a set of intervals, check if any two intervals overlap or not.
Let a(n) be a sequence of numbers, which is defined by the recurrence relation a1=1 and a(n+1)/a(n)=2n. The task is to find the value of log2(a(n)) for a given n.
In this round interviewer gave me three coding questions that I solved properly. Also, the interviewer asked me to write the code for them which I wrote neatly on paper with proper comments.
Given a sorted dictionary of an alien language, find order of characters in language.
Sample case:
Input words[]= {"caa", "aaa", "aab"};
Output = c a b
Explanation: As the given array is sorted so c comes before a and after that b according to given string.
Implement the data structure which takes constant time for insertion, deletion and find operations.
Given a string (STR) of length N, you have to create a new string by performing the following operation:
Take the smallest character from the first 'k' characters of STR, remove it from STR and append it to the new string.
You have to perform this operation until STR is empty.
He gave me some puzzles, one coding question, and few subjective questions based on networking and Database Management System. I was able to crack all puzzles but not able to solve that one coding question but gave all solutions to theory questions.
You are blindfolded and 10 coins are placed in front of you on the table. You are allowed to touch the coins, but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which.
Can you make two piles of coins each with the same number of heads up? You can flip the coins any number of times.
There are 1000 wine bottles. One of the bottles contains poisoned wine. A rat dies after one hour of drinking the poisoned wine. How many minimum rats are needed to figure out which bottle contains poison in hour.
I solved this puzzle using a short example. I took 8 bottles and feed three rats with wine. I fed each rat 4 bottles. Now, suppose three rats have the following wine configuration:
Rat 1 - 3 6 7 8 (0 0 1 0 0 1 1 1)
Rat 2 - 2 5 7 8 (0 1 0 0 1 0 1 1)
Rat 3 - 4 6 5 8 (0 0 0 1 1 1 0 1)
If no rat die then we can say that poison is in bottle 1, if rat 1 dies then we can say that poison is in bottle 3 as it was first bottle to fed by rat 1, similarly, if Rat 2 dies than bottle 2 was poisoned and if Rat 3 dies bottle 4 was poisoned. If both Rat 1 and Rat 3 die, then bottle 6 has poison. If Rat 1 and Rat 2 die, then we can say that bottle 7 has poison. If both Rat 2 and 3 dies, then bottle 5 have poison, and if all rats die then bottle 8 was poisoned. So making combinations, we can see that for 8 bottles you need 3 rats. Similarly, for 4 bottles you need 2 rats or in general, for 2^n bottles, you need n rats. So for 1000 bottles, you will need Log2(1000) which approximately comes out to be 10 ,so 10 was the answer of that puzzle. So just by taking shorter example I solved this puzzle and the interviewer was satisfied with my answer.
Consider a pipe of length L. The pipe has N water droplets at N different positions within it. Each water droplet is moving towards the end of the pipe(x=L) at different rates.
When a water droplet mixes with another water droplet, it assumes the speed of the water droplet it is mixing with. Determine the no of droplets that come out of the end of the pipe.
I told him about the normalization process starting from definition and gave him an example of normalization. I only remember 2-3 purposes of normalization, which I told to interviewer like to minimize redundancy, to break bigger tables in smaller and form links between them.
The interviewer was very interactive and kind, so he made me comfortable all the time during the interview. In this round, he asked me theory questions based on Red Black tree and detailed discussion on my projects which I mentioned on my resume.
Following are the two characteristics of red-black trees.
1. The nodes in a red-black tree are colored. Each node can be either red or black.
2. When a node is inserted or deleted in a red-black tree. certain rules have to be followed to ensure that the tree remains balanced after the node deletion or insertion.
Explained him through the diagram and all properties of the RB tree.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is a constructor in Java?