Pregunta de entrevista de Unity

Just practice, algorithm question are not hard.