2. Selection and Iteration

Informal Runtime Analysis — Quiz

Test your understanding of informal runtime analysis with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

In informal runtime analysis, what does it usually mean to say that an algorithm runs in linear time?

Question 2

A loop checks each element of an array once. If the array has $n$ elements, what is the most likely informal runtime classification?

Question 3

Which statement best describes constant time behavior?

Question 4

An algorithm has two separate loops, and each loop goes through an array of size $n$. What is the informal runtime of the algorithm?

Question 5

Why is a nested loop that goes through an array inside another loop often described as quadratic time?
Informal Runtime Analysis Quiz — AP Computer Science A | A-Warded