Showing posts with label Binary Search Tree. Show all posts
Showing posts with label Binary Search Tree. Show all posts

Threaded Binary Search Tree

 THREADED BINARY SEARCH TREE


THREADS:  We will replace certain NULL entries by spacial pointer which point to nodes higher in tree.These special pointer are called threads.


LINKS: Those pointers which contain the address of its successor node in tree is called link.


EXAMPLE:


RIGHT THREADED BINARY SEARCH TREE: 
Those tree which have only right threaded than it is known as right threaded  binary search tree.

Binary Search Tree (BST)

BINARY SEARCH TREE

Binary Search Tree is a binary tree in which parent data is always greater than its left child data and always less than its right child data and again all sub tree are Binary tree.



Example of Left Binary Search Tree for 50 ,49 , 48 , 47, 45 , 44