Pregunta de entrevista de Cash App

A leetcode style coding question - kth largest number