frnd check ur code.. t contains much errors.. consider the following eg.: k=5; 3 1 4 2 5
On Aug 22, 2:30 pm, "R.ARAVINDH" <aravindhr...@gmail.com> wrote: > can v do like this??? > > findnodes(root,sum) > { > if(root==abs(sum-root->data)) > print (the data is root->data, sum-(root->data)); > else > if(root<abs(sum-root->data)) > findnodes(root->right,sum-root->data) > else if(root>abs(sum-root->data)) > findnodes(root->left,sum-root->data) > else if(root->left==NULL || root->right==NULL) print(root,sum-root); > > > > } -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.