Round 2: PS-DS Round (1 hr)

This was a problem solving and data structures related round.

Interviewer asked me following questions with working code.

  1. At any point of time, find the average of max k numbers from an incoming stream of infinite numbers. I solved it using min-heap of k size and maintaining a sum variable to find the average. For every insertion to min-heap add the element to sum and for every deletion from min-heap, subtract the element from sum.  To get the average return sum/no. of elements.
  2. Copy the contents of  a given stack to another stack in same order without using extra space.
  3. Rain water trapping problem. https://www.w3wiki.org/trapping-rain-water/

I solved all of the above problems and my interviewer was satisfied.

Flipkart Interview Experience | SDE-1 (Experienced)

Similar Reads

Round 1: Machine Coding Round (1.5 hrs)

I was  given  the following problem statement and asked to  implement it with any choice of programming language.  They expected the code to be production-level, modular and bug free. After this, there was an evaluation round for the code. They tested the code with all corner cases and asked me to modify the code for new requirements which I was able to do easily....

Round 2: PS-DS Round (1 hr)

This was a problem solving and data structures related round....

Round 3: Hiring Manager Round (1 hr)

The HM had  an in-depth discussion on my latest project and technologies that I had used in the project.He asked me a lot of behavioral questions as well....

Contact Us