-
Notifications
You must be signed in to change notification settings - Fork 13
Interview Experience 59 (Intern)
#2017
#Intern
There were total 3 rounds.
The 1st round was online coding round, there were 2 coding questions and 20 MCQs.
The MCQs were from DSA, OOPs OS and General Apti. Around 160 students sat for the 1st round among which 19 were selected for the 2nd round.
2nd round:- This was a technical round of around 1hr.
The interviewer asked me two coding questions.
The 1st question was- "Connect all leaves of a binary tree, without using extra memory. The leaves may or maynot be at the same level". I first gave him him the algo and then he told me to code. At first I wrote a code, there were some mistakes which he pointed out and told me to correct them. I corrected the and wrote the code afresh.
The 2nd question was- "Find the position of an element in a sorted array of infinite numbers." Now since the array is sorted we have to apply binary search, but for that we need the upper bound and the size is not known. I told him that we would take 2 variables low and high pointing to lower and higher indices resp (Full approach http://www.geeksforgeeks.org/find-position-element-sorted-array-infinite-numbers/). He then asked me why I would 2high each time and not 3 or 4*. He then said me to derive the time complexity for 2high and 5high and explain which would be better. I derived the complexity and explained him why 2*high was the best way. We then had some normal talks and he told me to go.
6 students were selected for the final round, this was also technical round. Here the interviewer asked me 3 questions.
1st- "An array contains both positive and negative numbers, arrange the numbers in sequence of on one positive then one negative and so on." I told the logic and wrote the correct code for it at once.
2nd question- "Construct a binary tree given the preorder and inorder traversal." I told the logic and started to write the code but got confused. He then told me to just write the whole algo and it would suffice.
3rd question- "Check a postfix expression for evaluation and evaluate it if expression was correct using stack". I told the logic and wrote the correct code for it at once.
The interview was over and 2 candidates were finally selected.