Pregunta de entrevista de X

They are all algorithm question