Pergunta de entrevista da empresa Revolut

LeetCode question with binary trees.