logo

Crowdly

Browser

Add to Chrome

Imagine que tem um programa P implementado, que recebe como input n números...

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

Imagine que tem um programa P implementado, que recebe como input n

números. Ao experimentar executá-lo com testes aleatorizados, obteve os seguintes tempos de execução:

  • Com n=100

    demorou 0.5 segundos

  • Com n=200

    demorou 4 segundos

  • Com n=400

    demorou 32 segundos

Qual será a complexidade temporal mais provável do programa P?

//

Imagine you have an implemented program P, which receives n numbers as input.

When you run it with randomized tests, you get the following execution times:

With n=300, it took 0.5 seconds

With n=600, it took 4.0 seconds

With n=1200, it took 32 seconds

What is the most likely time complexity of program P?

0%
0%
100%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.fct.unl.pt?

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

Browser

Add to Chrome