Walmart interview question

kth max element in list