AP CSA - Thinking Through an FRQ

Thinking Through an FRQ

A Step-by-Step Guide to AP Computer Science A Free Response Questions

AP CSA 2025 15 min read Printable PDF available

The #1 thing students get wrong about FRQs:

They think they need to invent something new.

In reality, FRQs are about translation - converting English requirements into Java code using patterns you already know.

1. The Mindset Shift

When students tell me they "don't know where to start" on an FRQ, the problem isn't usually their Java knowledge. It's their approach. They're treating the FRQ like a creative writing assignment where they need to invent something from scratch.

"I know Java, but I don't know how to turn the problem into code."

Here's the truth: Every FRQ is a translation problem. The prompt tells you exactly what to do in English. Your job is to convert that English into Java using patterns you've seen dozens of times before.

Wrong Mindset
"I need to figure out a clever solution"
"This is a new problem I've never seen"
"I should start writing code immediately"
"I need to get everything perfect"
Right Mindset
"I need to translate English to Java"
"This uses patterns I already know"
"I should plan in English first"
"I need to get partial credit everywhere"
Key Insight FRQs are not IQ tests. They test whether you can read carefully, recognize patterns, and apply standard Java constructs. That's it.

2. The 4-Step Framework

Use this framework for every single FRQ part. It works whether you're writing a simple getter method or a complex 2D array traversal.

1

READ and HIGHLIGHT

Circle the method signature. Underline what to return. Box any conditions or rules. Mark example inputs/outputs.

2

PLAIN ENGLISH FIRST

Before writing any Java, describe what you need to do in simple sentences. "I need to go through each item and check if..."

3

PATTERN MATCH

Connect your plain English description to Java patterns. "Go through each" = for loop. "Check if" = if statement.

4

WRITE and CHECK

Translate to Java. Then trace through with the given example to verify. Fix any issues before moving on.

Pro Tip Spending 2 minutes on Steps 1-3 will save you 10 minutes of confused coding. Students who skip straight to writing code almost always have to restart.

3. Step 1: Read and Highlight

Most FRQ mistakes come from misreading the prompt. Train yourself to highlight these elements before writing any code:

What to Circle (Method Signature)

  • Method name - spell it exactly as given
  • Return type - this tells you what your method must produce
  • Parameters - these are your inputs; note their types
  • Access modifier (public/private) - usually public for FRQs

What to Underline (Return Value)

  • "returns the total..." - you need a sum/accumulator
  • "returns true if..." - you need a boolean condition
  • "returns an ArrayList containing..." - you need to build and return a list
  • "returns the index of..." - you need to track position

What to Box (Conditions and Rules)

  • "only if..." - this becomes an if statement
  • "for each..." - this becomes a loop
  • "at least" or "at most" - check your comparison operators
  • "in order" or "from left to right" - standard forward traversal
Common Mistake Pay special attention to words like "at least" (>=) vs "greater than" (>). This single character difference can cost you points.

Example: Reading a Prompt

Write the method countLongWords that returns the number of words in the array words that have more than 5 characters.

Your highlights:

CIRCLE: countLongWords (method name), returns...number (return type = int), words (parameter)

UNDERLINE: "returns the number" = I'm counting something

BOX: "more than 5 characters" = condition to check (> 5, not >= 5)

4. Step 2: Plain English First

This is the most important step that students skip. Before writing a single line of Java, describe your approach in plain English sentences.

Why This Works

When you try to think in Java immediately, you're doing two hard things at once: figuring out the logic AND remembering syntax. By separating these tasks, each becomes easier.

Template for Plain English Planning

Question Your Answer
What am I being asked to produce? (return type tells you)
What inputs do I have? (parameters tell you)
Do I need to look at every element? (usually yes = loop)
What do I check for each element? (conditions = if statements)
Do I need to keep track of something? (count, sum, list = variable)

Example: Plain English for countLongWords

Your Plain English Plan

"I need to return a count (integer).
I have an array of words as input.
I need to look at every word in the array.
For each word, I check if its length is greater than 5.
If yes, I add 1 to my count.
After checking all words, I return the count."

Pro Tip Write your plain English plan in the margin or on scratch paper. This 30-second investment prevents minutes of confused coding.

5. Step 3: Pattern Matching

Now convert each English sentence into its Java equivalent. This is where knowing your patterns pays off...

Plain English Java Pattern
"Go through each element" for (Type item : array)
"Keep a count" int count = 0; count++;
Enter your email above to continue reading

5. Step 3: Pattern Matching

Now convert each English sentence into its Java equivalent. This is where knowing your patterns pays off.

The Translation Dictionary

Plain English Java Pattern
"Go through each element" for (Type item : array)
"Go through by index" for (int i = 0; i < array.length; i++)
"Keep a count" int count = 0; ... count++;
"Keep a running total" int sum = 0; ... sum += value;
"Build a list of results" ArrayList result = new ArrayList<>();
"Add to the list" result.add(item);
"Check if something is true" if (condition) { ... }
"Otherwise do something else" else { ... }
"Return when found" if (found) return item;
"Return false if none found" return false; // after loop

Example: Pattern Matching for countLongWords

English: "Go through each word" --> for (String word : words)

English: "Keep a count" --> int count = 0;

English: "If length is greater than 5" --> if (word.length() > 5)

English: "Add 1 to count" --> count++;

English: "Return the count" --> return count;

6. Step 4: Write and Check

Now assemble your code and verify it works. Don't skip the verification - it's how you catch mistakes before they cost you points.

The Final Code

public int countLongWords(String[] words) {
    int count = 0;
    for (String word : words) {
        if (word.length() > 5) {
            count++;
        }
    }
    return count;
}

Verification Checklist

  • Trace through with the example from the prompt
  • Check that your return type matches what's required
  • Verify comparison operators (> vs >= vs ==)
  • Make sure you're returning, not just printing
  • Check that you initialized variables before using them
  • Verify loop bounds (off-by-one errors are common)
Pro Tip If the FRQ gives you an example with expected output, trace through your code step by step with that example. This catches 90% of errors.
Common Mistake Forgetting to initialize counter variables: int count; instead of int count = 0;. Always initialize!

7. Common FRQ Patterns

These patterns appear in FRQs year after year. Master them and you'll recognize them instantly.

Pattern 1: Count Elements Meeting a Condition
int count = 0;
for (Type item : collection) {
    if (/* condition */) {
        count++;
    }
}
return count;
Pattern 2: Build an ArrayList of Matching Elements
ArrayList result = new ArrayList<>();
for (Type item : collection) {
    if (/* condition */) {
        result.add(item);
    }
}
return result;
Pattern 3: Find First Match (Return Early)
for (Type item : collection) {
    if (/* condition */) {
        return item;  // or return true/index
    }
}
return null;  // or return false/-1
Pattern 4: 2D Array Traversal (Row by Row)
for (int row = 0; row < grid.length; row++) {
    for (int col = 0; col < grid[0].length; col++) {
        // process grid[row][col]
    }
}
Pattern 5: Sum/Accumulator
int sum = 0;  // or double for decimals
for (Type item : collection) {
    sum += item.getValue();
}
return sum;
Pattern 6: String Building
String result = "";
for (int i = 0; i < str.length(); i++) {
    if (/* condition on character */) {
        result += str.substring(i, i + 1);
    }
}
return result;
Pattern 7: Remove While Traversing (Backwards!)
for (int i = list.size() - 1; i >= 0; i--) {
    if (/* condition to remove */) {
        list.remove(i);
    }
}
Key Insight When removing elements from an ArrayList while traversing, always go backwards (from size()-1 down to 0). Going forward causes you to skip elements after each removal.

8. Practice Exercise

Apply the 4-step framework to this problem. Work through each step before revealing the solution.

Problem

Write the method removeShortWords that takes an ArrayList of Strings called words and removes all strings with 3 or fewer characters. The method returns nothing (void).

Step 1: Read and Highlight

What do you circle, underline, and box?

Write your answer here...

Step 2: Plain English

Describe your approach in sentences:

Write your plan here...

Step 3: Pattern Match

Which Java patterns will you use?

Identify patterns here...

Step 4: Write Your Code

Write your solution here...

Solution Walkthrough

Step 1 Analysis:

CIRCLE: removeShortWords, void, ArrayList words

UNDERLINE: removes all strings (modifying the list)

BOX: 3 or fewer characters (<= 3)

Step 2 Plain English

"I need to go through the ArrayList and remove words that are too short. Since I'm removing while traversing, I should go backwards to avoid skipping elements. For each word, if its length is 3 or less, I remove it."

Step 3 Patterns:

  • Backwards traversal (for removing from ArrayList)
  • Condition check (if length <= 3)
  • ArrayList remove method

Final Code

public void removeShortWords(ArrayList words) {
    // Traverse backwards to avoid index issues when removing
    for (int i = words.size() - 1; i >= 0; i--) {
        if (words.get(i).length() <= 3) {
            words.remove(i);
        }
    }
}

Quick Reference Card

The 4-Step Framework

1. READ - Circle signature, underline return, box conditions
2. PLAN - Write plain English description first
3. MATCH - Connect English to Java patterns
4. CHECK - Trace through with examples

Key Translations

count/how many - int count = 0; count++;
total/sum - int sum = 0; sum += x;
each element - for (Type x : arr)
by index - for (int i = 0; ...)
at least - >=
more than - >
build a list - ArrayList + .add()
remove while traversing - backwards loop

Ready for More Practice?

Put these strategies to work with real AP CSA FRQs from past exams.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

tanner@apcsexamprep.com

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at tanner@apcsexamprep.com