AP CSA FRQ Guide
2012 FRQ 1: ClimbingClub
Add climb records to a club list, first as appended entries and then in alphabetical order by peak name.
Skills Tested
What this FRQ is really practicing
Review these topics before attempting the problem.
Starter Approach
How to begin with your own plan
- 1Version A: append the new ClimbInfo record.
- 2Version B: insert the new record into the list by peak name.
- 3Part C: explain why the supplied distinctPeakNames algorithm can miscount with append-only order but works when peak names are kept sorted.
Attempt the problem before opening the solution.
Common Mistakes
Mistakes to watch for while writing
Self Check
Review questions before you submit
Creates a ClimbInfo object from the parameters.
Store both peak name and climb time.
Adds the new object to the list.
Use add with or without an index depending on the version.
Compares peak names for ordered insertion.
String ordering uses compareTo.
Handles insertion before the first larger peak name.
Do not always append in the ordered version.
Practice Links
