https://itsmekartikeya.medium.com/interview-question-kth-smallest-and-largest-element-of-array-c-58c83b545f9e