Find the kth largest element in an unsorted array. Note: kth largest, not kth distinct.
Three approaches:
The min-heap approach: keep a heap of size k. If a new element is larger than the heap's min, pop the min and push the new one. The heap's min is always the kth largest.
find_kth_largest([3, 2, 1, 5, 6, 4], 2)
5
find_kth_largest([3, 2, 3, 1, 2, 4, 5, 5, 6], 4)
4