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!
Which of the following statement are true for a Linear Queue?
The Stack ADT implements the following order when serving an item:
You want to create a study plan for your final exam, containing everything you should do daily starting from SWOTVAC until the day before the exam. What would be most appropriate to store your study plan knowing you may need to add new things as you remember?
Which of the following statements are true for the List ADT if implemented with arrays?
The Stack ADT implements the following order when popping an item:
What is the worst-time complexity of the following function if the input list is of size n?
def mystery(my_list: ArrayList) -> None:
my_queue = Queue(len(my_list) * 2)
for item in my_list:
my_queue.append(item)
my_queue.append(item)
while not my_queue.is_empty():
print(my_queue.serve())
If we need to frequently use the difference() operation for two sets, what implementation of the Set ADT would be "cheaper" in terms of the time complexity of this operation?
Stack pops items in the following order:
What does the following code do?
def mystery(a_list, b_list):
my_stack = Stack(len(a_list)+len(b_list))
my_list = List(len(a_list)+len(b_list))
for item in a_list:
my_stack.push(item)
for item in b_list:
my_stack.push(item)
while not my_stack.is_empty():
my_list.append(my_stack.pop())
return my_list
Order these operations from fastest to slowest based on their time complexity. Recall that the complexity of some of these operations may be measured with respect to different inputs.