Leetcode easy: Return k largest number.
Anonymous
- put all elements in Set data structure - pop all first K-1 elements - return the top element --> [N logN run time and N extra space] ========== - sort the array - return the Kth element
Check out your Company Bowl for anonymous work chats.