Pregunta de entrevista de Google

algorithms, runtime complexity, explaining thought process