@ above he asked iterative . .. use a stack to eliminate recursion ... On Thu, Jul 8, 2010 at 9:00 PM, Anand <anandut2...@gmail.com> wrote:
> height(struct *node) > { > int left_height; > int right_height; > if(node == NULL) > return 0; > else > left_height = height(node->left); > right_height = height(node->right); > return (1+ max(left_height, right_height)); > > > } > > On Thu, Jul 8, 2010 at 2:46 AM, sharad <sharad20073...@gmail.com> wrote: > >> write algo to find hieght of BINARY tree ITERATIVELY >> >> -- >> 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<algogeeks%2bunsubscr...@googlegroups.com> >> . >> 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 algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- With Regards, Jalaj Jaiswal +919026283397 B.TECH IT IIIT ALLAHABAD -- 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.