Education: B.Tech
Years of Experience: 3 Years
Prior Experience: Product Based Startup
No OA, direct Interview rounds
Round 1:
Q1. Find the kth largest element in an unsorted array. For example, given [3,2,1,5,6,4] and k = 3, return 4.
[ Did it using Heap of size K ]
Q2. Find the ordering of tasks from given dependencies.
Given tasks set= [1,2,3,4,5] and
Dependency map:
3 => 1,5
2 => 5,3
4 => 3
5 => 1
Output=> [1, 5, 3, 2 ,4] or [1, 5, 3, 4, 2][ did it using stack ( not very optimized ) BUT correct way was to use topological sorting that I didn't recall at that time. ]