Domanda di colloquio di Clear Labs

It was a leetcode medium question.