Question d’entretien chez TikTok

A leetcode problem with medium difficulties.