logo

Crowdly

What is the worst-time complexity of the following function if the input list ha...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the worst-time complexity of the following function if the input list has n elements?

def mystery(my_list: ArrayList) -> None:

    my_queue = Queue(len(my_list))

    

    count = 0

    for i in range (len(my_list)):

        my_queue.append(my_list[i])

        count+=1

        for i in range (count, 0, -1):

            print(count)
0%
0%
100%
0%
More questions like this

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

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