Recursive Binary Tree Find Largest Subtree

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
How about you check each subtree...
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.