BST Visualization

# Binary Search Tree

Binary search tree is type of binary tree. binary search tree are follow following properties.

1) root are the starting point of tree. inserted value is less then root node value then it will put on left side of root node. that is called left subtree.

2) If inserted value is greater than or equal to root node then it will put on right side of root node. That is called right subtree.

## Root Node

Root is starting point of bst. Help of root node is visited or access all other bst node..

Example of Root node

Example of Root node

## Leaf Node

leaf node are no left and right child. blue circle indicate leaf node of tree.

Leaf Node Try it yourself

Leaf Node Try it yourself

## Internal Node

Internal node or parent node are contains at least one child node

Leaf Node Try it yourself

Leaf Node Try it yourself

## Edge Presentation

Edge are represented as connectivity of bst node. one top node is is called parent node and another bottom node are called child node.

Edge : Try it yourself

Edge : Try it yourself

## Parent Node & Child node

presentation of given below BST parent node and child node.

View Tree Try it yourself

```        Parent Node [48] =  child Node[40 ,73]
Parent Node [40] =  child Node[27 ,45]
Parent Node [73] =  child Node[82]
Parent Node [82] =  child Node[78 ,94]
Parent Node [78] =  child Node[75]
Parent Node [75] =  child Node[76]
```

View Tree Try it yourself

```        Parent Node [68] <=>  child Node[8 ,86]
Parent Node [8] <=> child Node[7 ,60]
Parent Node [86] <=>  child Node[89]
Parent Node [60] <=>  child Node[45]
Parent Node [89] <=>  child Node[93]
Parent Node [45] <=>  child Node[40]
Parent Node [40] <=>  child Node[24]
```