Question d’entretien chez Bloomberg

I was a question from leetcode.