CS 415, Section 002 | Sonoma State University | Spring, 2022 |
Algorithm Analysis
|
||
Instructor: Henry M. Walker
Lecturer, Sonoma State University |
Instructions:
Consider the following two binary search trees:
This exercise demonstrates that simple insertion can produce a list-like structure for any data set for at least one ordering of the input data.
Is the operation of deletion in a binary search tree "commutative" in the sense that deleting x and then y from a binary search tree leaves the same tree as deleting y and then x? Argue why it is or give a counter example.
Argue that since sorting n elements takes Ω(n lg n) time in the worse case in the comparison model, any comparison-based algorithm for constructing a binary search tree from an arbitrary list of n elements takes at least Ω(n lg n) time in the worse case.
Dale/Walker, Chapter 9, Problem 15a
Show the final result after each letter is added.
Dale/Walker, Chapter 9, Problem 16a
Show the final result after each number is added.
created January 4, 2022 revised January 4, 2022 |
|
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu. |
Copyright © 2011-2022
by Henry M. Walker.
|