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 anyone help me doing that ?
On Tue, Aug 24, 2010 at 5:54 AM, Adam <wangyanadam1...@gmail.com> wrote: > 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 <rajn...@gmail.com> wrote: > > What will be the representation. How do you define left and right > pointers > > of the tree for a linked list. > > > > On Mon, Aug 23, 2010 at 10:35 PM, Yan Wang <wangyanadam1...@gmail.com > >wrote: > > > > > Actually, a linear data structure like a linked list is also a > > > specific kind of tree structure. > > > > > 2010/8/23 Raj N <rajn...@gmail.com>: > > > > Hi, > > > > Could anyone help me representing linked list in the form a binary > > > > tree ? > > > > > > Thanks !! > > > > > > -- > > > > 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> > <algogeeks%2bunsubscr...@googlegroups.com<algogeeks%252bunsubscr...@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> > <algogeeks%2bunsubscr...@googlegroups.com<algogeeks%252bunsubscr...@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. > > -- 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.