Pregunta de entrevista de Palantir Technologies

asked time complexity and space complexity questions