AlgoMaster Logo

Kth Largest Element in an Array

nums=[3, 2, 1, 5, 6, 4],k=2
0 / 17
algomaster.io
Step:Find the 2nd largest element with a size-2 min-heap