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.

2D Array Construction and Averaging22 minute target2D arraysconstructorsaveragesindexing

Skills Tested

What this FRQ is really practicing

2D arraysconstructorsaveragesindexing

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. 1Constructor: fill each row left-to-right or right-to-left according to scan order.
  2. 2Method: sum values in an inclusive row/column rectangle and divide by the number of values.

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

Filling every row left to right.
Dividing by rows plus columns instead of the number of cells.
Using exclusive end indexes for the rectangle.

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

Where to go next