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
The advantage of list over Arrays is flexibility. Over flood is not a problem until the computer memory is bushed. When the individual record are quite large, it may be difficult t

What is Ruby Ruby has numerous simple types, including numeric classes such as Integer, Fixnum, Bignum, Float, Big Decimal, Rational, and Complex, textual classes like String,

Q. Define the sparse metrics and also explain the representation of a 4X4 matrix using linked list.         Ans: A matrix in which number of zero entries is quite h

Best Case: If the list is sorted already then A[i] T (n) = c1n + c2 (n -1) + c3(n -1) + c4 (n -1)  = O (n), which indicates that the time complexity is linear. Worst Case:

Which are the two standard ways of traversing a graph? i. The depth-first traversal   ii. The breadth-first traversal

The size of stack was declared as ten. Thus, stack cannot hold more than ten elements. The major operations which can be performed onto a stack are push and pop. However, in a prog

how to define the size of array

Algorithm for insertion of any element into the circular queue: Step-1: If "rear" of the queue is pointing at the last position then go to step-2 or else Step-3 Step-2: make


Determine about the unreachable code assertion An unreachable code assertion is an assertion that is placed at a point in a program that shouldn't be executed under any circum