@Ravi: That is also my understanding, so the solution involves traversing 
the tree and keeping track of the values of the two largest leaf nodes.
 
Dave

On Monday, August 27, 2012 12:53:05 PM UTC-5, Ravi Maggon wrote:

> @atul
> I think he is asking for max. sum of elements between 2 leaf nodes and not 
> the max distance between two nodes.
>
> On Sun, Aug 26, 2012 at 6:12 PM, atul anand <atul.8...@gmail.com<javascript:>
> > wrote:
>
>> its the diameter of tree.
>> you can find implementation on geeksforgeeks
>>
>> On 8/25/12, kunal rustgi <rustog...@gmail.com <javascript:>> wrote:
>> > Hi,
>> >
>> > Can anyone suggest the best approach for finding max sum b/w 2 leaf 
>> nodes
>> > in a binary tree ( not BST )  ?
>> >
>> > --
>> > You received this message because you are subscribed to the Google 
>> Groups
>> > "Algorithm Geeks" group.
>> > To post to this group, send email to algo...@googlegroups.com<javascript:>
>> .
>> > To unsubscribe from this group, send email to
>> > algogeeks+...@googlegroups.com <javascript:>.
>> > For more options, visit this group at
>> > http://groups.google.com/group/algogeeks?hl=en.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Algorithm Geeks" group.
>> To post to this group, send email to algo...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> algogeeks+...@googlegroups.com <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> -- 
>
> ....................................
>
> *Regards
> *Ravi Maggon
>
> Member Technical - IT/Front Office
>
> D.E. Shaw & Co.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/3KkVfNZkjO4J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to