Question d’entretien chez Meta

Leetcode medium question, look them up!