logo

Crowdly

FIT1008-FIT2085 Fundamentals of algorithms - S1 2025

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!

Is the following function tail-recursive?

def fib (n: int) -> int:

if n == 0:

return 0

elif n == 1:

return 1

else:

return fib(n - 1) + fib(n - 2)

View this question

What is the main advantage of using tail recursion?

33%
0%
0%
0%
View this question

For a function to be recursive (and practical in Python), what should it have?

0%
0%
100%
100%
View this question

Is the following function tail-recursive?

def fib (n: int, a: int = 0, b: int = 1) -> int:

if n == 0:

return a

elif n == 1:

return b

else:

return fib(n - 1, b, a + b)

View this question

What is the time complexity of the following function if measured with respect to n?

def mystery(n: int) -> None:

if n <= 0:

return

else:

if n % 2 == 0:

mystery(n - 1)

else:

mystery(n // 2)

0%
0%
100%
0%
View this question

I want to keep track of the number of conflicts and collisions I have. So far, I have observed 4 conflicts and 2 collisions. I add a single item Charlie to the hash table. The hash position for Charlie is 0. What will my updated values be?

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

What is one disadvantage of Linear Probing?

View this question

I have a Hash Table with Linear Probing and lazy deletion. I am searching for an item, and notice whilst searching I skipped over multiple slots marked for deletion. What should I do?

0%
0%
0%
View this question

I want to traverse through a Dictionary implemented as a Linear Probing Hash Table, how should I do it?

0%
0%
0%
View this question

I want to keep track of the number of conflicts and collisions I have. So far, I have observed 4 conflicts and 2 collisions. I add a single item Charlie to the hash table. The hash position for Charlie is 4. What will my updated values be?

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!