AP Computer Science Exam Review
AP Computer Science practice problems & resources by topic
Each section focuses on an AP Computer Science Exam topic that has been tested extensively on previous exams.
All problems were created by AP CS Tutor Brandon Horn of mrHorn.com, Inc.
Classes & objects
- Constructing objects
- Class writing order
- Class writing exercise
- Duplicate data as instance variables
- Primitive types vs references exercises
- Primitive types vs references exercises with calls
- this keyword
- Static vs instance methods and fields
- ZombiePlant FR
- Object oriented UI
Data types and decisions
- Floating point roundoff error
- Generate random numbers with Math.random()
- Strings on the AP CS A Exam
- compareTo on the AP CS A Exam
- Short circuit evaluation of boolean expressions
- Logical operator precedence
- Boolean expression simplification
- else statement pairing
Standard algorithms
- Finding the minimum or maximum
- Detecting duplicates
- Accessing consecutive pairs
- Reversing an array
- Reversing an ArrayList
- Shifting or rotating elements
- Consolidating or filtering an array
- Inserting into a sorted list
- Also see Sorting & searching below
Loops, arrays and ArrayList
objects
- Traversing arrays and lists
- Run length increasing exercise
- Arrays as objects exercises
- Arrays of objects exercises
- Enhanced for loops
- Enhanced for loop exercises (including with 2D arrays)
- ArrayList practice
- Specimen free response
- Aquarium FR
- CandidatePool FR
- MyArrayList exercise
2D arrays
- Intro to 2D arrays
- Treating a 2D array as an array of 1D arrays
- 2D array exercises
- Mazer free response
- Droppy free response
- Flight free response
- MatrixManipulator exercise
Inheritance & polymorphism
- Inheritance and polymorphism
- Changing reference types
- WeightedDie free response
- TrickCard free response
- PirateParrot free response
Recursion
- Writing recursive methods
- Tracing recursive methods
- Analyzing recursive methods
- Recursive methods with print statements
- Recursive helper methods
- Recursive base conversion exercise
- DeterminantFinder exercise
Sorting & searching
Labs
Misc
GridWorld Case Study
Note: The GridWorld Case Study is no longer tested on the AP CS A Exam. This content remains available for classes that still use GridWorld.
- Location class practice test
- Grid interface practice test
- GiraffeCritter free response practice
- GridTools free response practice
- Connect 4 in GridWorld practice
AP Computer Science Exam Answers
Multiple Choice Explanations for Released Exams & Similar
- 2004 AP CS A Multiple Choice Explanations
- A level from 2004 AP CS AB Multiple Choice Explanations
- 2009 AP CS A Multiple Choice Explanations
- 2014 AP CS A Course Description MC Explanations
2024 AP CS Exam Free Response Solutions
- Feeder Free Response Solution
- Scoreboard Free Response Solution
- WordChecker Free Response Solution
- GridPath Free Response Solution
2023 AP CS Exam Free Response Solutions
- AppointmentBook Free Response Solution
- Sign Free Response Solution
- WeatherData Free Response Solution
- BoxOfCandy Free Response Solution
2022 AP CS Exam Free Response Solutions
- Game Free Response Solution
- Textbook Free Response Solution
- ReviewAnalysis Free Response Solution
- Data Free Response Solution
2021 AP CS Exam Free Response Solutions
- WordMatch Free Response Solution
- CombinedTable Free Response Solution
- ClubMembers Free Response Solution
- ArrayResizer Free Response Solution
2020 AP CS A Exam Free Response Solutions
The 2020 AP CS A Exam was administered online. Free response problems for the 2020 AP CS A Exam were not publicly released.
2019 AP CS Exam Free Response Solutions
- APCalendar Free Response Solution
- StepTracker Free Response Solution
- Delimiters Free Response Solution
- LightBoard Free Response Solution
2018 AP CS Exam Free Response Solutions
- FrogSimulation Free Response Solution
- WordPairList Free Response Solution
- CodeWordChecker Free Response Solution
- ArrayTester Free Response Solution
2017 AP CS Exam Free Response Solutions
- Digits Free Response Solution
- MultPractice Free Response Solution
- Phrase Free Response Solution
- Successors Free Response Solution
2016 AP CS Exam Free Response Solutions
- RandomStringChooser Free Response Solution
- LogMessage Free Response Solution
- Crossword Free Response Solution
- StringFormatter Free Response Solution
2015 AP CS Exam Free Response Solutions
- DiverseArray Free Response Solution
- HiddenWord Free Response Solution
- SparseArray Free Response Solution
- NumberGroup Free Response Solution
2014 AP CS Exam Free Response Solutions
- scrambleWord and scrambleOrRemove Free Response Solution
- Director Free Response Solution
- SeatingChart Free Response Solution
- Trio Free Response Solution
2013 AP CS Exam Free Response Solutions
- MusicDownloads Free Response Solution
- TokenPass Free Response Solution
- GridWorldUtilities & JumpingCritter Free Response Solution
- Skyview Free Response Solution
2012 AP CS Exam Free Response Solutions
- ClimbingClub Free Response Solution
- RetroBug Free Response Solution
- HorseBarn Free Response Solution
- GrayImage Free Response Solution
2011 AP CS Exam Free Response Solutions
- Sound Free Response Solution
- AttractiveCritter Free Response Solution
- FuelDepot Free Response Solution
- RouteCipher Free Response Solution
2010 AP CS Exam Free Response Solutions
- MasterOrder Free Response Solution
- APLine Free Response Solution
- Trail Free Response Solution
- GridChecker Free Response Solution
2009 AP CS Exam Free Response Solutions
- NumberCube Free Response Solution
- StockpileCritter Free Response Solution
- BatteryCharger Free Response Solution
- TileGame Free Response Solution
2008 AP CS Exam Free Response Solutions
2007 AP CS Exam Free Response Solutions
- SelfDivisor Free Response Solution
- StudentAnswerSheet Free Response Solution
- GameState Free Response Solution