45. find the K-th largest element in an unsorted array

JavaScriptAlgorithm
Is this helpful ?

from all members: - accepted / - tried

You are given an unsorted array of numbers, which might have duplicates, find the K-th largest element.

The naive approach would be sort it first, but it costs O(nlogn), could you find a better approach?

Maybe you can recall what is happening in Quick Sort or Priority Queue

Let's try to solve this problem within 15 mintues.