Find Kth Max And Min Element In An Array Leetcode