let intialize the count be equal to zero and pass it to left nodes as well as right nodes.
verticalsum(struct node* node,int count) { verticalsum(node->left,count-1); hash(count)+=node->data; verticalsum(node->right,count+1); } On Wed, Aug 24, 2011 at 9:18 PM, Nikhil Veliath <nve...@gmail.com> wrote: > find the vertical sum of a binary tree . . . wat do we mean by vertical > sum anyone any help > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > 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. > -- *Narayanan S,* B.E., C.S.E., (final year), College Of Engineering Guindy, Anna University, Chennai-25. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. 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.