If node N is being removed from a binary search tree and has a left child, what must be done if P is the parent of N?

a. let the left child of N adopt P
b. let P adopt the left child of N
c. store the data of the left child of N in N
d. store the data of N in P

b. let P adopt the left child of N

Computer Science & Information Technology

You might also like to view...

Compared to photographs, sketches represent a more focused illustration of applicable evidence

Indicate whether the statement is true or false.

Computer Science & Information Technology

Consider the function

``` void doStuff(int parValue, int parRef) {parValue = 100; cout “parValue in call to doStuff = parValue parRef =222; cout “parRef in call to doStuff = end ``` a) The call to doStuff results in the assignment n1 = 222; b) The call to doStuff results in the assignment n2 = 222; c) The call to doStuff results in the assignment n1 = 100; d) The call to doStuff results in the assignment n2 = 100; e) There is no effect on either of these variables..

Computer Science & Information Technology