https://ideas.creativecasinoties.com/post/kth-smallest-element-in-an-array-95b6py