Web portal to prepare and apply for CSE Interviews of Tier-1 Company.
1) Keep a Min & Max Heap of K size 2) Store first K elements in them. 3) If a new element comes with smaller or larger than root then reorder heap.