In this article, we will focus on different approaches on how to convert a normal binary tree into a threaded binary tree. We will convert our binary tree to single threaded binary tree with right pointers pointing to inorder successor (if it exists).
Approach 1Naive Approach
We can do the inorder traversal of the tree and store it in some queue. Do another inorder traversal and where ever you find a node whose right reference is NULL , take the front element from the queue and make it the rig...
Published on January 29, 2021 23:45