809 views
1 votes
1 votes
What is the time complexity to delete the root node in right skew tree?

I knew the three cases of BST deletion:- 0 child,one child,two child.

But how can we handle this particular question

2 Answers

0 votes
0 votes
I think first we have to perform inorder traversal to find the successor of the node which has to be deleted then delete the​ node and put the successor as the new root so it takes O(h) where h is the height of the binary search tree

Related questions

2 votes
2 votes
1 answer
1
rahul sharma 5 asked Oct 2, 2017
466 views
What is the worst case time complexity to construct unique BST froma:) Inorder and preordera:) Inorder and postorder
4 votes
4 votes
1 answer
2
4 votes
4 votes
2 answers
4
srestha asked Jan 12, 2017
925 views
If preorder of a BST is passed as an argument to the above function. Function returns 1 if,a)All the leaf nodes of the tree are at same levelb) All the nodes of the tree ...