Honestly.. guys.. i would appreciate if we could come up with
something concrete.

On Nov 20, 5:38 pm, ganesa thandavam <gthanda...@gmail.com> wrote:
> we need to use queue and stack alternately ...
>
> once we handle this , i think it should be straight forward to
> code ...
>
> On Nov 20, 9:27 am, dinesh bansal <bansal...@gmail.com> wrote:
>
>
>
> > On Wed, Nov 18, 2009 at 8:05 AM, Nayn <nayanish.hi...@gmail.com> wrote:
> > > Hi guys,
> > > Recently I came across a problem. We've to display a binary tree in
> > > spiral.
> > > 1. We need to print the nodes in BFS manner.
> > > 2. The nodes should be displayed in alternate direction; in one level
> > > from left to right and in next level right to left.
> > > Needless to mention, we need least time complex solution.
> > > Thanks
> > > Nayn
>
> > > --
>
> > > 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=.
>
> > > If its just about display, you can traverse the tree in BFS manner and
>
> > store the nodes in an array at their specific locations. At the end, display
> > the nodes from the array.
>
> > Thanks,
> > --
> > Dinesh Bansal
> > The Law of Win says, "Let's not do it your way or my way; let's do it the
> > best way."

--

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.


Reply via email to