There was a request from the audience to recap the quiz questions from the semester so far. If you were present for all 4 quizzes, your graded solutions are in your blue book and you can ignore the rest of this post. Here they are:
Quiz 1
Describe an algorithm that takes a list of distinct integers and finds the location of the largest even integer in the list or returns $0$ if there are no even integers.
Quiz 2
Show that is but that is not .
Quiz 3
Pick one of the following pairs and show that and have the same order.
- and
- and
- and
- and
- and
Quiz 4 (team quiz)
(Teams were assigned either the bubble sort or the insertion sort algorithm)
- Determine the complexity of your team’s algorithm by counting the number of comparisons required. Ignore comparisons needed to determine whether the end of a loop has been reached.
- Apply your sorting algorithm to the set . Show all the comparisons that are made and count the total number of comparisons. Check that this agrees with your answer from the first part.