@ above have it node * bsttolist(node *root){ if(root==NULL) return NULL; node *l=bsttolist(root->left); node *r=bsttolist(root->right); root->left=root; root->right=root; append(l,root); append(l,r); return l; }
here append function merges two circular doubly linked lists , you can make that on your own On Sun, Jul 25, 2010 at 1:35 PM, Debajyoti Sarma <sarma.debajy...@gmail.com>wrote: > @rahul > how to convert bst ot doubly linked list. > I m understanding the logic but not able to code > give a pseudo code to understand. > > -- > 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. > > -- With Regards, Jalaj Jaiswal +919026283397 B.TECH IT IIIT ALLAHABAD -- 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.