Question d’entretien chez Canva

Just a binary tree type leetcode question.