say max element is X
k element product is Xk
So, time complexity is O(1)
Am I wrong?
hmm
https://stackoverflow.com/questions/251781/how-to-find-the-kth-largest-element-in-an-unsorted-array-of-length-n-in-on
64.3k questions
77.9k answers
244k comments
80.0k users