Pregunta de entrevista de Redfin

Basic algorithm and data structure questions