Pergunta de entrevista da empresa Cash App

A leetcode style coding question - kth largest number