AP CSA FRQ Guide
2011 FRQ 4: RouteCipher
Fill a 2D character block from a message and encrypt message chunks by reading the block in the route order.
2D Array String Encryption22 minute target2D arraysStringrow-majorcolumn-major
Skills Tested
What this FRQ is really practicing
2D arraysStringrow-majorcolumn-major
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
- 1Fill the block in row-major order, padding short chunks with the required filler.
- 2Encrypt each block-sized chunk and concatenate encrypted chunks.
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
Forgetting padding for the final partial block.
Using the wrong chunk size.
Reading or filling in the wrong row/column order.
Self Check
Review questions before you submit
Fills the block by rows and columns.
Track the current character index while traversing the block.
Pads missing characters when the chunk is short.
The archive prompt specifies a filler character.
Processes the message in block-sized chunks.
The chunk size is rows times columns.
Calls the provided block encryption after filling each block.
Do not reimplement unrelated helper behavior if the prompt provides it.
Practice Links
