Pregunta de entrevista de Goldman Sachs

Basic datas tructure and algorithm coding questions.