Question d’entretien chez Virtasant

Solve this problem from leet code: [leet code problem]