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.

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...

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...