The Gateway to Computer Science Excellence
0 votes
89 views

Assume a Binary Search Tree is not allowed to have duplicates, there is more than one way to delete a node in the tree when the node has two children.If we resolve the situation in favor of choosing element for replacement from left substructure, then which one of the following is true about replacement element?

  1. Largest node in left subtree
  2. Smallest node in right subtree
  3. Both

I know it is predecessor node, but can it be successor too ??

“If we resolve the situation in favor of choosing element for replacement from left substructure” what this line exactly means?

in DS by Veteran (119k points)
edited by | 89 views

1 Answer

0 votes
I think Left substructure denotes left sub tree

Hence, Option A is correct as Option B involves choosing from Right Subtree
by (19 points)

Related questions

+8 votes
5 answers
3
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,391 answers
198,589 comments
105,442 users