Do a BFS of the tree, keep a separator to masrk where a level ends.. create
the linklist for every level.

On Wed, Sep 21, 2011 at 6:00 PM, prasanth n <[email protected]> wrote:

> Given a binary search tree, design an algorithm which creates a linked list
> of all the nodes at each depth (i.e., if you have a tree with depth D,
> you’ll have D linked lists).
>
> --
> *prasanth*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to