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.