logo

Crowdly

Browser

Add to Chrome

FIT1008-FIT1054-FIT2085 Fundamentals of algorithms - S2 2025

Looking for FIT1008-FIT1054-FIT2085 Fundamentals of algorithms - S2 2025 test answers and solutions? Browse our comprehensive collection of verified answers for FIT1008-FIT1054-FIT2085 Fundamentals of algorithms - 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!

Given the below code, what is the contents of the mystery object at the end of the following block of code:

mystery = ArraySet(10)

mystery.add(1)

mystery.add(1)

mystery.add(2)

mystery.add(3)

mystery.remove(3)

print(mystery)

0%
0%
0%
0%
View this question

What is the worst-case time complexity of Linear Search using an unsorted array of size N (ignore the cost of item comparison).

View this question

What is the worst-case time complexity of this function?

  • Try to find the tightest upper bound you can.
  • Try to simplify as much as you can.
  • Even if your answer isn't the tightest upper bound/the most simplified, still write your attempt - there are partial marks.
  • Provide some reasoning for your answer (no explanation, no marks), and don't forget to define the variables you use.

def func(n):

    counter = 0

    i = 1

    while i <= n:

        for j in range(i):

            counter += 1

        i *= 2

    

    return counter

View this question

What is the worst-case time complexity of this function?

Make sure you define any variables you use and you can ignore the cost of comparison. (no explanation, no marks)

def func(arr: List[int], target: int) -> List[int]:

    n = len(arr)

    for i in range(n - 1):

        for j in range(i + 1, n):

            if arr[i] + arr[j] == target:

                return [i, j]

    return []

View this question

What does the peek operation in a Stack do?

0%
0%
0%
0%
View this question

I want to keep track of the number of collisions I have. So far, I have observed 2 collisions. No items have been removed from the hash table. I add a single item Charlie to the hash table. The hash position for Charlie is 0. What will my updated collision count be?

Note: We are using Linear Probing to handle collision resolution.

100%
0%
0%
0%
View this question

I want to keep track of the number of collisions I have. So far, I have observed 2 collisions. No items have been removed from the hash table. I add a single item Charlie to the hash table. The hash position for Charlie is 3. What will my updated collision count be?

Note: We are using Linear Probing to handle collision resolution.

100%
0%
0%
0%
View this question

Can separate chaining collision resolution can be implemented using Array instead of linked nodes? 

0%
0%
100%
View this question

Is separate chaining a collision resolution mechanism based on open addressing?

View this question

You want to create a shopping list of items you need from the supermarket. What would be most appropriate to store your items? Assume we want to collect the items in any order from the shopping list.

0%
0%
0%
0%
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