@all: Now the problem is for getting O(n) time and O(1) space we have to
run two inorder traversal simultaneously. How can we do it??

On Mon, Sep 3, 2012 at 9:31 PM, Karthikeyan V.B <[email protected]> wrote:

> @navin and @atul:
>
> inorder traversal without recursion and stack can be done using Morris
> traversal in O(1) space.
>
> Refer the following link for Morris traversal
>
> http://www.geeksforgeeks.org/archives/6358
>
> now the problem takes O(n) time and O(1) space.
>
>  --
> 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.
>

-- 
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.

Reply via email to