Question d’entretien chez UBS

leetcode easy medium question that wa bit difficult