AP CSA FRQ Guide
2013 FRQ 4: SkyView
Load one-dimensional telescope scan data into a 2D view using alternating row direction, then average a rectangular region.
Skills Tested
What this FRQ is really practicing
Review these topics before attempting the problem.
Starter Approach
How to begin with your own plan
- 1Constructor: fill each row left-to-right or right-to-left according to scan order.
- 2Method: sum values in an inclusive row/column rectangle and divide by the number of values.
Attempt the problem before opening the solution.
Common Mistakes
Mistakes to watch for while writing
Self Check
Review questions before you submit
Allocates the 2D view array.
Use numRows and numCols.
Tracks the current index in scanned.
Use a separate index as values are copied.
Handles alternating row direction.
Odd and even rows fill in opposite directions.
Averages all values in the inclusive rectangle.
Loop from start through end for both rows and columns.
Practice Links
