438. Kth Largest Element in an Array
Given an array A of integers and an integer k, find and print the kth largest element in the array. Note that the kth largest element refers to its position in the sorted order, not the kth distinct element.
The first line of input contains two space-separated integers N (the size of the array) and K. The second line contains N space-separated integers representing the elements of the array.
Print the kth largest element of the array.
6 2 4 6 2 7 9 1
1 <= N <= 10^4 1 <= k <= N -10^5 <= Arr[i] <= 10^5