[algogeeks] Re: Print tree node which sum

2013-03-05 Thread Dave
@Marti: I'm not quite sure if you mean that there are two problems, one with a BST and the other with an ordinary tree, or if you mean that one of the summands comes from a BST and the other comes from an ordinary tree. If both values come from a BST, do two simultaneous inorder traversals,

[algogeeks] Re: separate coins into heaps of similar weights using balance in minimum comparisons

2013-03-05 Thread Don
I don't see how a statement like 3 coins together weigh x kg provides any new information. Using a binary search algorithm you should be able to find any coins which weigh the same in 17 comparisons in the worse case. On Mar 2, 12:42 am, Shubham Sandeep s.shubhamsand...@gmail.com wrote: @dave