CS 112 - Lab 9
Questions


Name: _________________________ ID: ____________________
Friday Lab Section (check one): [ ] 8:00am-11:00am

[ ] 11:10pm-2:10pm

Provide answers (on this sheet) to the questions below, and hand them to the TAs at the beginning of lab on Friday, April 25.

  1. What will the binary search tree look like after you delete the node having the key Hamlin?
    			Matthews
    			/     \
    		       /       \
    		   Hamlin     Steffey
    		   /   \         \
    		  /	\	  \
    	      Daniels Howards   Winslow
    		 \	 \	   \
    		  \	  \	    \
    	 	 Fords 	 Johns	   Woods
    
    
    
    
    
    
    
    
    
    
    
    
  2. Why do you need to write the find( ) function for deletion? Could you have simply used your previous lookup( ) function? Explain.
    
    
    
    
    
  3. Which functions will have to be changed if you want to implement an AVL tree rather than a binary search tree?