Pergunta de entrevista da empresa TradingHub

leetcode question relating to tree search.