All Questions
Tagged with binary-tree recursion
2 questions
2
votes
1
answer
132
views
Find ALL duplicate subtrees. using recursion
This is just a practice exercise, I'm trying to understand dynamic programming as deeply as I can. I solved this using recursion, though I am not sure if it will always work. If anyone could tell me a ...
1
vote
1
answer
220
views
Best way to store the sum of all node depths?
To sum up all the nodes' depths in any given binary tree, I've written the following recursive algorithm:
...