The threaded binary tree, Data Structure & Algorithms

By changing the NULL lines in a binary tree to the special links called threads, it is possible to execute traversal, insertion and deletion without using either a stack or recursion.

In a right in threaded binary tree each NULL link is replaced by a particular link to the successor of that node under the inorder traversal called right threaded. Using right threads we shall find it easy to perform an inorder traversal of the tree, since we need to only follow either an ordinary link or a threaded to find the next node to visit.

If we replace each NULL left link by a particular link to the predecessor of the node known as left threaded under inorder traversal the tree is called as left in threaded binary tree. If both the left and right threads are present in tree then it is called as fully threaded binary tree for example:

303_threaded binary tree.png

Posted Date: 7/12/2012 9:18:45 AM | Location : United States







Related Discussions:- The threaded binary tree, Assignment Help, Ask Question on The threaded binary tree, Get Answer, Expert's Help, The threaded binary tree Discussions

Write discussion on The threaded binary tree
Your posts are moderated
Related Questions

This question deals with AVL trees. You must use mutable pairs/lists to implement this data structure: (a) Define a procedure called make-avl-tree which makes an AVL tree with o

Q. Describe the representations of graph. Represent the graph which is given to us using any two methods Ans: The different ways by which we can represent graphs are:

how to define the size of array

How sparse matrix stored in the memory of a computer?

implement multiple stacks in an array and write different algorithms to perform operations on it

Question: (a) Discuss the importance of game theory to decisions. (b) Explain the following: (i) saddle point, (ii) two-person zero-sum game. (c) Two leading ?rms, ABC Ltd a

Define Minimum Spanning Tree A minimum spanning tree of a weighted linked graph is its spanning tree of the smallest weight, where the weight of a tree is explained as the sum

The structures of files vary from operating system to operating system. In this unit, we will discuss the fundamentals of file structures with the generic file organisations. A

Simulation of queues: Simulation is the process of forming an abstract model of a real world situation in order to understand the effect of modifications and the effect of introdu