Looking for FIT1008-FIT2085 Fundamentals of algorithms - S1 2025 test answers and solutions? Browse our comprehensive collection of verified answers for FIT1008-FIT2085 Fundamentals of algorithms - S1 2025 at learning.monash.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Quicksort algorithm. For our pivot choice, we are using an algorithm to find the median of an unsorted list. The algorithm we opt to use for this takes O(n) time, where n is the size of the list we are partitioning. This would make the overall worst-case time complexity of Quicksort as O(nlogn). Why don't we use this approach in general?Is Quicksort a stable sorting algorithm?
Assume we have the following list: [10, 9, 3, 4, 2, 5] and we select 5 to be the pivot. What would the list be after one iteration of quicksort?
You should use the partition algorithm discussed in the pre-reading.
I am trying to decide whether I should use Quicksort or Mergesort to sort a list. What factors would affect my choice?
Quicksort algorithm. For our pivot choice, we are using an algorithm to find the median of an unsorted list. The algorithm for opt to use for this takes O(n) time, where n is the size of the list we are partitioning. What would the overall worst-case time complexity of this implementation of Quicksort be?Quicksort is not a stable sorting algorithm. Can we make Quicksort stable?
Assume we have the following list: [10, 9, 3, 4, 2, 5] and we select 4 to be the pivot. What would the list be after one iteration of quicksort?
You should use the partition algorithm discussed in the pre-reading.
1. Briefly describe List ADT giving details about [4]
1. What does it mathematically mean that f(n) = O(g(n)), in your own words? [3]
2. Assuming that f(n) = O(n^2) and g(n) = O(n^2 logn), what should be f(n) + g(n)? Why? Simplify the resulting expression. [3]
3. What is the worst-case time complexity of the function "func2"? Explain. When providing your analysis, don't forget to specify what is the input size. [4]
1. Briefly describe a bit-vector, giving details about