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
explain the determination of interest rate in the classical system.

Sorting Algorithm A sorting algorithm is an algorithm which puts elements of a list in a certain order. The most-used orders are numerical order and lexicographical order. Eff

Q. Write an algorithm INSERT which takes a pointer to a sorted list and a pointer to a node and inserts the node into its correct position or place in the list.  Ans: /* s

Q. The reason bubble sort algorithm is inefficient is that it continues execution even after an array is sorted by performing unnecessary comparisons. Therefore, the number of comp

If a Dequeue is implemented via arrays, then this will suffer with the similar problems which a linear queue had suffered. Program 8 gives the array implementation of Dequeue.

Define order of growth The  efficiency  analysis  framework  concentrates   on  the  order  of  growth  of  an  algorithm's   basic operation count as the principal indicator o

Containers Introduction Simple abstract data types are useful for manipulating simple sets of values, such as integers or real numbers however more complex abstract data t

What are circular queues?  Circular queue: Static queues have a very large drawback that once the queue is FULL, even though we erase few elements from the "front" and relieve

Question 1 Explain how the shuttle sort algorithm works by making use of the following list of integers:11, 4, 2, 8, 5, 33, 7, 3, 1, 6. Show all the steps. Question 2

Define the term array. An array is a way to reference a series of memory locations using the same name. Each memory location is represented by an array element. An  array eleme