Re: [algogeeks] Re: linked list as tree

2010-08-25 Thread Raj N
@TurksHead: No its linked list to tree On Wed, Aug 25, 2010 at 6:59 AM, TurksHead Education < turksheadeducat...@gmail.com> wrote: > I hope you are not talking about converting a tree into a linked list > http://www.rawkam.com/?p=1139 > > > > On Tue, Aug 24, 2010 at 7:20 AM, Raj N wrote: > >> I

Re: [algogeeks] Re: linked list as tree

2010-08-25 Thread Raj N
@Yan Wang: Thanks a lot !! On Wed, Aug 25, 2010 at 12:19 AM, Yan Wang wrote: > I know what you mean now. > It's not very hard to implement your idea. > > First, construct a usual binary sorting tree based on the original > linked list. Notice that I also use the inner nodes to store the > element

Re: [algogeeks] Re: linked list as tree

2010-08-25 Thread TurksHead Education
I hope you are not talking about converting a tree into a linked list http://www.rawkam.com/?p=1139 On Tue, Aug 24, 2010 at 7:20 AM, Raj N wrote: > I came across this example that the leaves of the tree can be the nodes of > a linked list and the inner nodes of the tree can be the number of l

Re: [algogeeks] Re: linked list as tree

2010-08-24 Thread Yan Wang
I know what you mean now. It's not very hard to implement your idea. First, construct a usual binary sorting tree based on the original linked list. Notice that I also use the inner nodes to store the elements in the linked list rather than only using the leaf nodes. And the quantity feature you m

Re: [algogeeks] Re: linked list as tree

2010-08-24 Thread Raj N
I came across this example that the leaves of the tree can be the nodes of a linked list and the inner nodes of the tree can be the number of left subtrees. This kinda data structure can be used to find the kth element of a linked list very easily. I was not able to implement such an idea.. Can an

[algogeeks] Re: linked list as tree

2010-08-23 Thread Adam
What do you exactly mean? You want to represent a linear structure by using a tree structure? You can imagine a linked list as a tree with all its root and inner nodes only having one descendent/child node. On Aug 23, 10:50 am, Raj N wrote: > What will be the representation. How do you define lef