any suggestion frds ?? my thinking is eitther
a) root + left formsa path
b) oot +right form a path
c) left +root +right form a path

d) path only in left
e) path only in right

this thought process seems to be worng to me as its highly expensive and i
am myself not convinced of what to do next . Any suggestion ???

--mac

On Fri, Aug 19, 2011 at 1:20 PM, MAC <[email protected]> wrote:

>
> can someone explain how to solve this:
>
> You are given a binary tree in which each node contains a value. Design an
> algorithm to print all paths which sum up to that value. Note that it can be
> any path in the tree - it does not have to start at the root.
>
> (please write how to solve it i.e. logic u came up and algo &&not just
> another program)
>
> --
> thanks
> --mac
>
>


-- 
thanks
--mac

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to