logo

Crowdly

Browser

Add to Chrome

FIT2004 Algorithms and data structures - S2 2025

Looking for FIT2004 Algorithms and data structures - S2 2025 test answers and solutions? Browse our comprehensive collection of verified answers for FIT2004 Algorithms and data structures - S2 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!

Consider the following array:

A = [4,5,2,3,9,6,10,8,1,7]

We wish to find the 8th order statistic (the element that would be at the 7th index in a sorted array using 0-indexing). 

We use the QuickSelect algorithm along with Hoare's algorithm for in-place partitioning. The chosen pivot is always the first element of the subarray

As the partitioning algorithm is in place, swaps made in the partitioning algorithm will be reflected permanently in the array. 

Consider the state of the array after 2 rounds of partitioning or alternatively, if the 8th order statistic is found earlier, consider the state of the array at that point. 

Select all statements that are TRUE. The array is 0-indexed.

0%
0%
0%
0%
View this question

Consider the following array:

arr = [7, 9, 14, 1, 8, 2, 4, 12, 5, 6, 10]

Determine which partitioning scheme, Naive or Hoare's, was used to end

up with the provided resulting array based on the given pivot. Assume

0-indexing and that Naive 3-way partitioning is being considered.

View this question

Consider the following array:

A = [8,1,6,9,10,4,7,5,3,2]

We wish to find the 9th order statistic (the element that would be at the 8th index in a sorted array using 0-indexing). 

We use the QuickSelect algorithm along with Hoare's algorithm for in-place partitioning. The chosen pivot is always the first element of the subarray

As the partitioning algorithm is in place, swaps made in the partitioning algorithm will be reflected permanently in the array. 

Consider the state of the array after 2 rounds of partitioning or alternatively, if the 9th order statistic is found earlier, consider the state of the array at that point. 

Select all statements that are TRUE. The array is 0-indexed.

0%
0%
0%
0%
0%
0%
View this question

Consider the following array:

arr = [3, 4, 1, 9, 12, 10, 2, 7, 5, 14, 8] 

Determine which partitioning scheme, Naive or Hoare's, was used to end

up with the provided resulting array based on the given pivot. Assume

0-indexing and that Naive 3-way partitioning is being considered.

View this question

Consider the following array of numbers with the idea of sorting them using radix sort:

A = [ 7402, 676, 2, 7428, 5225, 95, 76, 3002 ]

Now consider the state of the array after the first two iterations

of the main loop in radix sort. Assume the sort is in ascending order. Select all the correct statements based on the state of the resulting array. Assume 0-indexing.

0%
0%
0%
0%
0%
0%
View this question

Consider the following array of numbers with the idea of sorting them using radix sort:

A = [ 114, 45, 9, 6034, 73, 2477, 909, 5834 ]

Now consider the state of the array after the first two iterations

of the main loop in radix sort. Assume the sort is in ascending

order. Select all the correct statements based on the state of the resulting array. Assume 0-indexing.

100%
0%
0%
100%
0%
100%
View this question

Consider the following array of numbers with the idea of sorting them using radix sort:

A = [ 38, 956, 2462, 182, 9410, 5041, 6, 1081 ]

Now consider the state of the array after the first two iterations

of the main loop in radix sort. Assume the sort is in ascending

order. Select all the correct statements based on the state of the resulting array. Assume 0-indexing.

0%
0%
0%
0%
0%
0%
View this question

Solve, in big-θ, the following recurrence relation

T(n) = T(n-2) + c, where n >= 2

T(n) = b, where n < 2

for constants b and c.
View this question

Given the following pseudocode, derive the recurrence relation that represents its time complexity. 

def double_factorial(n):

if n <= 1:

return 1

return n * double_factorial(n - 2)

Let b and c represent constant values. What is the base case and recurrence step?  

View this question

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome