Nagarro interview question

K’th Smallest/Largest Element in Unsorted Array