AP CSA FRQ Guide
2015 FRQ 1: DiverseArray
Write helper methods to sum arrays, produce row sums, and determine whether all row sums are different.
1D and 2D Array Helpers22 minute targetarrays2D arrayshelper methodsduplicates
Skills Tested
What this FRQ is really practicing
arrays2D arrayshelper methodsduplicates
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
- 1Sum a one-dimensional array.
- 2Call the sum helper for each row of a 2D array.
- 3Detect duplicate row sums.
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
Summing columns instead of rows.
Returning true after comparing only the first pair.
Recomputing row sums in a way that hides duplicate values.
Self Check
Review questions before you submit
Traverses the whole one-dimensional array.
Use an enhanced for loop or indexed loop.
Uses arraySum when computing row sums.
The rowSums method should reuse the helper.
Creates an int[] for row sums.
The result length should match the number of rows.
Checks every pair of row sums for equality.
A nested loop over rowSums is a common solution.
Practice Links
