He had clearly stated that this could be done using a normal sorting algorithm in O(n log n), but I had to provide a more optimized solution.
I proposed a solution using a stack, which somehow worked for the test case he gave me. However, he proved it wrong and provided a hint to use another data structure. I understood the hint and realized it was to be done using a min-heap. The time complexity of this approach was O(n log k).
He had clearly stated that this could be done using a normal sorting algorithm in O(n log n), but I had to provide a more optimized solution.
I proposed a solution using a stack, which somehow worked for the test case he gave me. However, he proved it wrong and gave me a hint to use another data structure. I understood the hint and realized it was to be done using a min-heap. The time complexity of that approach was O(n log k)!
The following metrics were computed from 4 interview experiences for the Flipkart Software Developer role in Bengaluru, Karnataka.
Flipkart's interview process for their Software Developer roles in Bengaluru, Karnataka is very selective, failing most engineers who go through it.
Candidates reported having very good feelings for Flipkart's Software Developer interview process in Bengaluru, Karnataka.