VMWare Inc Interview Question
Software Engineer / DevelopersUse ordered BST and have two pointers for small and large in BST. While converting use the small pointer as previous and large pointer as next.(small pointer has the address of the node which is lesser than the parent and the large pointer has the address of the node which is greater than the parent.
We may do it recursively like postorder traversal
- Lei February 22, 2010