AP Computer Science Free Response Solutions

Every year, two days after the AP Computer Science exam, College Board releases the free response questions. And every year computer science teachers around the country dig through the questions and come up with solutions of their own.

I'm a bit mixed on posting these. Having solutions publicly available means that students can find working solutions without doing the work. But, having solutions to look at also serves a function in learning. And since there are dozens of sites with working solutions already, I'm going to go ahead and post my solutions here. I've got solutions going back to 2004 when the AP test switched to Java, but they're not all here yet. As I type up explanations they'll show up here.

I'm not going to include any of the FRQs that covered Grid World or the Marine Biology case studies. Since they're no longer tested, it didn't make sense to include them here.

2022

Data FRQ Solution

The 2022 AP Computer Science Data FRQ has you working with a matrix and random numbers

Read more...

Game

The 2022 AP CompSci free response question has you working with a pair of classes to create a game

Read more...

Review Analysis

The Review Analysis had you working with both an array and ArrayList and an arbitrary class, Review. Here's how we solved it.

Read more...

Textbook

Solution for the Textbook Free Response Question: AP Computer Science A 2022 Exam

Read more...

2021

Club Members

Learn how to solve the ClubMembers problem on the 2021 AP Computer Science exam with this step-by-step guide.

Read more...

Combined Table

Understand the ins and outs of building a Java class from scratch with the Combined Table FRQ from the 2021 AP Computer Science exam.

Read more...

2020

Due to Covid, College Board did not release the free response questions in 2020.

2019

AP Calendar

AP Calendar has you working with an arbitrary class and dates

Read more...

Delimiters

Delimiters is a problem where you're working with an ArrayList of strings.

Read more...

Lightboard

Lightboard from the 2019 CompSci AP-A FRQ has you working with a 2d-array.

Read more...

StepTracker

StepTracker has you implement a full class from scratch

Read more...

2018

ArrayTester

In ArrayTester you're working with 1-d and 2-d arrays of integers

Read more...

CodeWordChecker

In CodeWordChecker you're building a class from scratch that implements an interface

Read more...

Frog Simulation

The frog simulation FRQ on the 2018 AP CompSci exam tested your logic and algorithmic ability by checking if a frog can successfully hop their way to a goal.

Read more...

WordPair

In WordPair you're working with a list of an arbitrary class called WordPair

Read more...

2017

Digits

The Digits FRQ has you working with an integer, an ArrayList filled with Integer objects, and making a determination on that ArrayList based on contents.

Read more...

Phrase

In Phrase you're working with processing a string

Read more...

Study Practice

Study Practice has you working with a parent and subclass to build a class for practicing multiplication problems

Read more...

Successors

In Successors you're working with a 2d-array of integers and an arbitrary class, Position

Read more...

2016

Crossword

The Crossword Free Response question on the 2016 Computer Science AP-A exam had you working with a 2-d array of an arbitrary class.

Read more...

LogMessage

LogMessage has you working with Strings and an ArrayList of a class called LogMessage.

Read more...

Random String Chooser

The first free response question on the 2016 AP Computer Science exam, Random String Chooser, had you write a complete class that could be dropped into a bit of sample client code.

Read more...

String Formatter

The String Formatter free response question from the 2016 AP CompSci exam asked you to implement code to format a string to a fixed width by adding spaces between words

Read more...

2015

Diverse Array

Diverse Array has you working with 1d and 2d arrays to decide if it's "diverse"

Read more...

Hidden Word

The Hidden Word FRQ has you starting from scratch to build a full class to work with strings

Read more...

Number Group

Number Group has you working with classes and interfaces to solve a problem

Read more...

Sparse Array Entry

Sparse Array Entry has you working with an ArrayList of an arbitrary class called SparseArrayEntry

Read more...

2013

Download Info

Download Info has you implement a solution using an ArrayList of an arbitrary class

Read more...

2012

Climb

The Climb FRQ has you working with a ArrayList of objects

Read more...

GrayImage

The GrayImage free response problem from the 2012 AP Computer Science exam has you working with a 2 dimensional array of integer values.

Read more...

Horse Barn

The Horse Barn FRQ has you working with a ArrayList of objects and interfaces

Read more...

2011

Sound

For the Sound FRQ you're working with a one dimensional array of integers

Read more...

2004

PR2004 Robot

The PR2004 Robot Free Response question from the 2004 AP Computer Science exam has you working with an array of integer values.

Read more...

Pet

The Pet FRQ from the 2004 AP Computer Science Exam tested that you can work with ArrayLists and understand how abstract classes work

Read more...

WordList

On WordList you are working with an ArrayList of Strings and checking their lengths

Read more...