Question d’entretien chez UST

Asked to solve a leetcode question.