Binary Tree to Doubly LinkedList Conversion [ Microsoft – Amazon ]

Problem:Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL.The order of nodes in DLL must be same as Inorder of the given Binary Tree. The first node of  Inorder traversal (left most node in BT) must be head node of the DLL.

This is well described in here and here .

Link

 

Comments are closed.