Pregunta de entrevista de Palantir Technologies

Questions on time and space complexity, coding proble.