by stacks i meant the usage of extra space.. recursion stack is handled by the OS.. so it doesnt bother.. ok
On Aug 22, 1:08 pm, "R.ARAVINDH" <aravindhr...@gmail.com> wrote: > @manohar and @giri:: > > doesn recursion itself use stacks( implicitly)?? > > On Aug 18, 9:26 pm, Giri <giri.pe...@gmail.com> wrote: > > > > > @manohar: thnks man.. this solution would be apt.. > > > if there's any better algo which doesn't use an extra stack or queue, > > but does the purpose in recursion, do post it.. > > > On Aug 18, 8:01 am, Manjunath Manohar <manjunath.n...@gmail.com> > > wrote: > > > > Tree *node > > > for(i=1;i<=height;i++) > > > { > > > levelorder(node,i);} > > > > void levelorder(Tree *node,int level) > > > { > > > if(level==1) > > > printf(node->value); > > > else > > > levelorder(node->left,level-1) > > > levelorder(node->right,level-1); > > > > } -- 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.