Make delicious recipes!

Convert a BST into a sorted doubly linked list (SDLL)

Traverse the tree in an inorder fashion so that the tree is traversed in a sorted order.

At each node, the previously accessed node is the previous link of the SDLL.

If we keep the previously accessed node in a global variable and change the previous and current node pointers at every step of tree-traversal, then we will end up with a SDLL.

Like us on Facebook to remain in touch
with the latest in technology and tutorials!

Got a thought to share or found a
bug in the code?
We'd love to hear from you:

Email: (Your email is not shared with anybody)

Facebook comments:

Site Owner: Sachin Goyal