Domanda di colloquio di Revolut

LeetCode question with binary trees.