Pregunta de entrevista de TuSimple

One asked one easy classic leetcode problem.