Question d’entretien chez Hummingbird Web Solutions

One question from leetcode hard and medium section