Pregunta de entrevista de Verily

Min heap type question, two pointer question