Domanda di colloquio di Cash App

A leetcode style coding question - kth largest number