AP CSA FRQ Guide
2010 FRQ 4: GridChecker
Find an actor with the most occupied neighboring locations and collect occupied locations within two rows and columns of a target location.
Skills Tested
What this FRQ is really practicing
Review these topics before attempting the problem.
Starter Approach
How to begin with your own plan
- 1Part A: inspect occupied locations and track the actor with the largest neighbor count.
- 2Part B: search a bounded row/column window around loc and return occupied locations other than loc.
Attempt the problem before opening the solution.
Common Mistakes
Mistakes to watch for while writing
Self Check
Review questions before you submit
Uses occupied locations from the grid.
GridWorld provides a helper for occupied locations.
Counts neighbors for each occupied actor.
Use adjacent occupied locations or neighbor helpers.
Handles an empty grid by returning null.
No actors means no best actor.
Checks row and column offsets within two.
The search window is at most two rows and two columns away.
Practice Links
