Presentation on theme: "Types of Binary Trees Introduction. Types of Binary Trees There are several types of binary trees possible each with its own properties. Few important."— Presentation transcript:
Types of Binary Trees There are several types of binary trees possible each with its own properties. Few important and frequently used trees are listed as below: 1. Binary search tree 2. Expression tree 3. Heap tree 4. Threaded Binary tree
Types of Binary Trees 5. Height balanced tree(AVL tree) 6. 2-3 Trees 7. Weight Balanced tree 8. m-ary Trees tree 9. Trie Structures tree 10. B/B+ tree
Binary Search Tree A binary search tree T is termed as binary Search tree (or binary sorted tree) if each node N of T satisfies the following property: The value of the node in the left childe or Left sub tree is less than the value of the root. The value of the node in the right child or right sub tree is more than or equal to the value of the root. All the sub trees of the left & right children observe above two rules.
Basic Operation on Binary Search Tree Inserting any data into it Deletion any data from it Searching for a data Traversing the data
What is different between Tree, Binary tree & Binary Search tree? A tree is a data structure that only allows one parent but multiple children. A Binary Search tree is a specific case of a tree. First, it is a binary tree, meaning that a node can at most have two children. Here, sorting not imported. And it is a binary search tree meaning that the left child of a value is less than the parent value while the right child value is greater than the parent value.
Traversal of a Binary Search Tree There are: Preorder traversal (PLR) Inorder traversal(LPR) Postorder traversal(LRP)