the main code is dis function only:::::i will explain dis
static Node treeToList(Node root) {
Node aList, bList;
if (root==NULL) return(NULL);*
/* the below next two lines are just lyk inorder traversal...u mst
hv done dis*/*
aList = treeToList(root->small);
bList = treeToList(root->large);
*/* this is for breaking the links of its left n right child nodes
n pointing to itself*/*
root->small = root;
root->large = root;
* /* Appending leftchild parent n rightchild together in
doublylinked list form */*
aList = append(aList, root);
aList = append(aList, bList);
return(aList);
}
--
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.