Six exam-style questions through Activity 2.12, weighted toward efficiency, heuristics, and what cannot be computed. These sets are cumulative, so anything earlier is still fair game.
Algorithm reasoning is the largest single slice of the exam's multiple-choice section. This set is worth more attention than its points suggest.
Guessing beats leaving it blank. There is no penalty for a wrong answer on the AP exam, so a blank is a guaranteed zero where a guess is not.
Four have exactly one correct answer, one asks you to select all that apply, and the last is about data or the impact of computing rather than about code.
What does the following C# display?
int steps = 0;int n = 25;
for (int i = 0; i < n; i++){ for (int j = 0; j < 4; j++) { steps = steps + 1; }}
Console.WriteLine(steps);251006254The number of steps an algorithm takes grows like n × n × n as the input grows. This algorithm is described as running in:
Which of these are true of a heuristic?
A problem for which no algorithm can be written that always gives a correct yes-or-no answer is called:
What is the cheapest way to deliver these twelve parcels? This is best described as:
A company builds a tool to rank job applications. It is trained on the company's own hiring records from the past ten years, during which the company rarely hired women as engineers. The tool now ranks applications from women lower. This is best described as:
Six answers, each marked sure or unsure, plus how far you got when the timer went off.