What will be the worst case time complexity for Deletion of a node in a BST.
Answers
Answered by
2
Answer:
GM FRIEND
Explanation:
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, deletion in binary tree has worst case complexity of O(n).
MAKE ME BRILLIANT........
FOLLOW ME......
Answered by
0
Answer:
o(n)
Explanation:
In case of BST, the worst case happens when the element to be deleted is located in the leaf node, so by BFS( breadth First Traversal) to reach the element to delete the node , one has to traverse the farthest to reach the leaf node from the root node and hence the complexity increases the the no of degrees of the tree increases.Here, n is the degree of the BST.
Similar questions
CBSE BOARD X,
5 months ago
Computer Science,
5 months ago
Computer Science,
5 months ago
Chemistry,
10 months ago
Science,
1 year ago
English,
1 year ago
Physics,
1 year ago