CMPSC 465 Algorithm Complexities Exam #1 Questions with
Correct Answers
QuickSort - ✔✔Average TC: 𝜃(n log n)
Worst-case TC: 𝜃(n²)
SC: O(n)
RandomSelect - ✔✔TC: 𝜃(n)
SC: O(n)
MoMSelect - ✔✔TC: O(n)
SC: O(n)
MoMSort - ✔✔TC: O(n log n)
SC: O(n)
LinearSearch - ✔✔TC: 𝜃(n)
SC: O(n)
BinarySearch - ✔✔TC: O(log n)
SC: O(n)
HeapSort - ✔✔TC: O(n log n)
SC: O(n)
Correct Answers
QuickSort - ✔✔Average TC: 𝜃(n log n)
Worst-case TC: 𝜃(n²)
SC: O(n)
RandomSelect - ✔✔TC: 𝜃(n)
SC: O(n)
MoMSelect - ✔✔TC: O(n)
SC: O(n)
MoMSort - ✔✔TC: O(n log n)
SC: O(n)
LinearSearch - ✔✔TC: 𝜃(n)
SC: O(n)
BinarySearch - ✔✔TC: O(log n)
SC: O(n)
HeapSort - ✔✔TC: O(n log n)
SC: O(n)