Pregunta de entrevista de Youdao.com

Just regular algorithm questions.