I don't understand what you mean.
Consider a simple inorder traversal of a balanced binary tree. Using
recursion, the code is simply:
void inorder(Node *node) {
if (node == NULL)
return;
inorder(node->left);
print(node->val);
inorder(node->right);
}
What do you consider to be the above code's space complexity? It is O(log n)
but what you are saying is that it is O(1)!!
On Wed, Jan 26, 2011 at 2:23 AM, juver++ <[email protected]> wrote:
> @abovew NO!
>
> --
> 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]<algogeeks%[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.