15 MCQs on c/c++ output based, 1 java questions was also there.

F2F Interview

**Round 1:**

Q1. The interviewer first discussed about my projects, specially my data mining project.

Q2. Convert a Binary Tree to Doubly Link List in place?

**Round 2: **

Q1. One DBMS query select 2nd max salary from table,

Q2. OS questions from deadlock, synchronization, scheduling, diff between process and thread.

Q3. What happens when you type URL in browser and hit enter? Explain in detail.

**Round 3:**

Q1. There is a constant flow of numbers coming in from some infinite list of numbers out of which you need to maintain a data structure as to return the top 100 numbers at any given point of time. Assume all the numbers are integer numbers only.

I gave him a solution using min-heap. We can create a min heap of 100 elements. The first 100 elements is easy to handle. Lets say we get the 101th element in the list. If this number is less than the root of the binary heap then we need not do anything. If this number is greater then the root of the binary heap then we need to replace the root element with this element and call percolate-down procedure on the root of the binary heap.

My interviewer concluded my interview with this question.