@Praveen- In this case, we will not ignore the right subtree of the root (-10, which is less than zero) while traversing the tree.
On Sat, Oct 23, 2010 at 9:06 PM, Praveen Baskar <[email protected]>wrote: > i think it is possible nishaanth > please do take a look at this example > > -10 > / \ > -11 8 > /\ > -5 10 > -5 is greater than -10 > > > On Sat, Oct 23, 2010 at 11:19 PM, nishaanth <[email protected]> wrote: > >> @Praveen....it is not possible..in a BST *all the nodes* on the right >> subtree are greater than the node :) >> >> >> On Sat, Oct 16, 2010 at 3:26 PM, Praveen Baskar >> <[email protected]>wrote: >> >>> @nishaanth: wat if the left child of the right node has a negative value >>> >>> On Thu, Oct 14, 2010 at 11:12 AM, nishaanth <[email protected]>wrote: >>> >>>> >>>> >>>>> Just see the value of the node at every point, if it is greater than >>>> zero dont recurse the right sub-tree, as simple as it is.print the node u >>>> inspected if it is less than zero. >>>> >>>> >>>> >>>> >>>> -- >>>> S.Nishaanth, >>>> Computer Science and engineering, >>>> IIT Madras. >>>> >>>> -- >>>> 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]<algogeeks%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/algogeeks?hl=en. >>>> >>> >>> >>> >>> -- >>> By B. Praveen >>> >>> -- >>> 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]<algogeeks%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> >> >> -- >> S.Nishaanth, >> Computer Science and engineering, >> IIT Madras. >> >> -- >> 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]<algogeeks%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > By B. Praveen > > -- > 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]<algogeeks%[email protected]> > . > 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 [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.
