Recursive Binary Tree Find Largest Subtree

Jan 30, 2012 at 1:49am
Wondering how I can recursively traverse a binary search tree

Pseudo code or actual code would be helpful here in this case.
Last edited on Jan 30, 2012 at 1:59pm
Jan 30, 2012 at 4:21am
How about you check each subtree...
Jan 30, 2012 at 5:05am
for each sub tree
    call get sum
find which has the greatest sum

get sum:
    for each sub tree
        call get sum
    return this number plus the sum of sums
Topic archived. No new replies allowed.