Pergunta de entrevista da empresa ByteDance

It is a two-pointer rank problem.