Developing Algorithms FRQ Practice

Responses receive AI feedback against a rubric after submission. Scores are practice estimates.

Question 1 of 5

readings=[5,9,5,1]. Count matches to 5. (a) FOR EACH pseudocode into c. (b) Resulting c? (c) Count values > 5 instead; final count?

Question 2 of 5

Correct max: best ← list[1]; update when later element greater. Mistaken: best ← 0; same updates. List [4,10,7]. (a) Correct result? (b) Mistaken result on this list? (c) All-negative list where mistaken fails; wrong vs correct max.

Question 3 of 5

trip=[4,1,3]. Adjacent swaps to sort. (a) After swap indexes 1 and 2? (b) Next adjacent swap and resulting list? (c) How combining swap steps builds a sorting algorithm?

Question 4 of 5

Robot faces north at R. G goal. W wall.

Row C1 C2
R1 G W
R2 R W

(a) Algorithm to reach G. (b) Different algorithm also reaching G. (c) Why more than one correct algorithm helps testing?

Question 5 of 5

Display sum of nums. (a) Pseudocode from total ← 0. (b) Result for [2,2,2]? (c) If total ← 1 instead, side effect for that list?