https://freecpp.com/kth-largest-element-in-an-array/