1 votes 1 votes In deleting the root element of a BST, we have to replace root with _________ a)Inorder successor b)Inorder predecessor c)Both a and b DS data-structures binary-search-tree + – Anjan asked Jan 17, 2018 Anjan 351 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Hemant Parihar commented Jan 17, 2018 reply Follow Share Both can be used it doesn't violate the property of BST. 0 votes 0 votes Shubhanshu commented Jan 17, 2018 reply Follow Share We can replace it with in-order successor or in-order predecessor, provided that it should not be a skew tree. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Both are correct. Inorder successor => Replacing with minimum value element from right subtree Inorder predecessor => Replacing with maximum value element from left subtree In both cases BST property will be peserved. smsubham answered Mar 20, 2020 smsubham comment Share Follow See all 0 reply Please log in or register to add a comment.