Question d’entretien chez Applied Intuition

Try to solve a program from leet code