Convert Binary Search Tree to Doubly Linked List | Java Solution
Program to convert a binary search tree to doubly linked list with in-order traversal.
The left and right pointers in nodes are to be used as previous and next pointers respectively in converted Circular Linked List.The order of nodes in List must be same as Inorder of the given Binary Tree. The first node of Inorder traversal must be head node of the Circular List.
Example:
Given a binary search tree:
4 / \ 2 5 / \ 1 3
return 1<->2<->3<->4<->5
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login .