Pregunta de entrevista de Google

Signed NDA but general simple algorithm questions.