Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Name Tree node deleti from the previous step in that row. 3. on. See attached no

ID: 3715906 • Letter: N

Question

Name Tree node deleti from the previous step in that row. 3. on. See attached notes from class. Each step in a row deletes a node from the tree resulting iii. Delete J a. Starting tree i. Delete H ii. Delete W H W G Y b. Starting tree i. Delete F ii. Delete P iii. Delete E B EG KRW c. In the example below, first follow the class algorithm and i) make the left child the new root. Then, adjust the algorithm by making ii) the right child the new root. Which is better and why? Starting tree i. Delete L, make F root ii. Delete L, make P root C H

Explanation / Answer

3. Tree node deletion -

a.
           J
       H       W
   C       S       Z
       G       Y
      
i. Delete H.

J
   C W
       G   S       Z
Y
              
ii. Delete W.

           J
   C Z
       G S       Y
              
              
iii. Delete J.

           Z
   C Y
       G S