Isn't adding to the queue O(n log n)? You have to do it once for each array element (n), but adding an array element to a java priority queue is O(log n). So overall it's O(n log(n) k log(n)).
Kth Largest Element in an Array
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.