Question d’entretien chez Google

Leetcode hard question, can't share because NDA