Pergunta de entrevista da empresa AVEVA

Given a node in a tree, sum that node's value and all of its descendants' values.

Resposta da entrevista

Sigiloso

3 de jun. de 2024

I didn't get to the end. I got close, but didn't quite get the right answer. I think I should have used a BFS approach.