AP CSA FRQ Guide

2011 FRQ 3: FuelDepot

Find the lowest fuel tank at or below a threshold and move a robot to a target tank without moving past the ends.

List Search and Directional Movement22 minute targetlistsinterfacessearchstate

Skills Tested

What this FRQ is really practicing

listsinterfacessearchstate

Treat these skills as the study checklist. If any tag feels shaky, review that topic before attempting the full written response.

Starter Approach

How to begin without copying a solution

  1. 1Search tanks for the lowest fuel level that is at or below the threshold.
  2. 2If no tank qualifies, return the current robot index.
  3. 3Turn the robot if needed and move it the correct distance.

Write a first attempt before revealing any solution outline. Most AP CSA FRQ progress comes from tracing your own code and finding the missing case.

Common Mistakes

Mistakes to watch for while writing

Returning the first tank under threshold instead of the lowest qualifying tank.
Changing robot state inside nextTankToFill.
Moving the robot the wrong distance after changing direction.

Self Check

Review questions before you submit

Searches tanks that are at or below the threshold.

Ignore tanks above the threshold.

Tracks the lowest qualifying fuel level.

The next tank is not simply the first qualifying tank.

Falls back to the robot current index when no tank qualifies.

Use the robot state without changing it.

Changes direction only when needed before moving.

Compare current index, target index, and facing direction.

Practice Links

Where to go next