Kth Largest Element in an Array
Push each number into a heap, trim the heap whenever it grows beyond size k, and the root will end up as the kth largest value.
Return the kth largest element from an unsorted list.
Push each number into a heap, trim the heap whenever it grows beyond size k, and the root will end up as the kth largest value.
Push each number into a heap, trim the heap whenever it grows beyond size k, and the root will end up as the kth largest value.
Return the kth largest element from an unsorted list.