CS367 Homework 7
| ||
AnnouncementsCheck here periodically.
| ||
QuestionsHomework assignments must be done individually. Collaboration on homework assignments is not allowed. Question 1:All parts of this question refer to standard binary search trees. The next question will deal with red-black trees, but for this question assume you are using simple binary search trees with no extra balancing logic. Part A: Show the binary search tree that results from inserting the following sequence of integers into a tree that is initially empty: Part B: Show the binary search tree that results from inserting the following sequence of integers into a tree that is initially empty: Part C: Show the binary search tree that results from deleting 66 from the tree in part B. Part D: Show the binary search tree that results from deleting 33 from the tree in part B. Question 2:All parts of this question refer to red-black tree. If you are creating a text-file containing your solution, indicate red nodes by using square brackets around the value (e.g., [44] ) and indicate black nodes by not using any brackets around the value (e.g., 44 ). If you are creating your solution by hand on a piece of paper, indicate red nodes by drawing a square around the value and indicate black nodes by drawing a circle around the value. Part A: Show the red-black tree that results from inserting the following sequence of integers into a tree that is initially empty: Part B: Show the red-black tree that results from inserting the following sequence of integers into a tree that is initially empty: | ||
Handing inPlease include your name at the top your file. For this assignment you have two options for creating and submitting your answers:
| ||
Last Updated: 11/13/2015 © 2014 Beck Hasti |