Question

In a code flow involving frequent insertions and deletions, which type of Binary Search Tree is preferred to guarantee O(log
n) time complexity for these operations in the worst case?

A Unbalanced BST
B Skewed BST
C Complete BST
D Self-balancing BST (e.g., AVL tree, Red-Black tree)
E Full BST
Practice Next

Hey! Ask a query