Question d’entretien chez Bloomberg

It was a medium-difficulty leetcode question.