Question d’entretien chez ByteDance

It is a two-pointer rank problem.