codelike-logo
BST Visualization
AVL

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..

90 90 is root node root Node1005070

Example of Root node

50 is root node 50 root Node708060302040

Example of Root node

Leaf Node


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

60218716336798356568

Leaf Node Try it yourself

504760250924555100

Leaf Node Try it yourself

Internal Node


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

57108571082861472

Leaf Node Try it yourself

58466764764249893045

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.

70144383705999376338

Edge : Try it yourself

583993669993557183

Edge : Try it yourself

Parent Node & Child node


presentation of given below BST parent node and child node.

48407327458294787576

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]
      
688608674514892493

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]
      

Comments