Quiz 100% Result
  • Cyberian's Gold

    o Binary Search trees
    o AVL trees
    o Rotation cases of AVL trees
    o Balancing Factor of trees

  • Cyberian's Gold

    @zareen said in The objective of this assignment is:

    o Binary Search trees

    Binary Search Tree (BST) –
    BST is a special type of binary tree in which left child of a node has value less than the parent and right child has value greater than parent. Consider the left skewed BST shown in Figure 2.
    38f0c7fc-691d-4731-811e-528ccf01a075-image.png

    Searching: For searching element 1, we have to traverse all elements (in order 3, 2, 1). Therefore, searching in binary search tree has worst case complexity of O(n). In general, time complexity is O(h) where h is height of BST.

    Insertion: For inserting element 0, it must be inserted as left child of 1. Therefore, we need to traverse all elements (in order 3, 2, 1) to insert 0 which has worst case complexity of O(n). In general, time complexity is O(h).

    Deletion: For deletion of element 1, we have to traverse all elements to find 1 (in order 3, 2, 1). Therefore, deletion in binary tree has worst case complexity of O(n). In general, time complexity is O(h).

50% Off on Your FEE Join US!

Quiz 100% Result If you want to know how you can join us and get 50% Discout on your FEE ask Cyberian in Chat Room! Quiz 100% Result Quiz 100% Result
| |