2023 AP CSA FRQ 1: AppointmentBook Solution + Rubric

May 2026 exam uses a NEW point structure — tap for details

This page shows the original 2023 FRQ 1, which the College Board scored on a 9-point rubric. The May 2026 exam uses a NEW point distribution and structure — the patterns and traps on this page still apply, but expect different point values and formats on test day.

FRQ 1: 7 points (2 parts: Part A 4pts + Part B 3pts) — Methods & Control Structures

FRQ 2: 7 points (single part) — Class Design

FRQ 3: 5 points (single part) — Data Analysis with ArrayList

FRQ 4: 6 points (single part) — 2D Array

Total Section II: 25 points = 45% of exam score. Only Question 1 has two parts on the 2026 exam; Questions 2, 3, and 4 each have a single part.

Sources: Official College Board CED, Exam Overview (page 145) · Skylight Publishing CED Sample FR Solutions (page 161 reference)

2023 AP CSA FRQ 1: AppointmentBook — Complete Solution & Rubric

Step-by-step solution to 2023 AP CSA FRQ 1 (AppointmentBook) with the official 9-point rubric, common mistakes that cost points, and a built-in 22-minute practice timer. Written by an AP Computer Science teacher whose students earn 5s at more than 2x the national rate.

Year: 2023 Question: 1 of 4 Points: 9 Topics: Methods, Control Structures Difficulty: Easy
Recommended pace: 22:00 per FRQ 22:00

The Official 2023 FRQ 1 Question

The complete prompt is in the PDF below. Use the recap above the editor to keep the key requirements in mind while you write your response.

The PDF cannot be embedded on this device.

Open Prompt PDF in New Tab

Write Your Part A Response: findFreeBlock

Read the prompt above and write your responses in the editors below — Part A in the first, Part B in the second. The real AP exam in Bluebook gives you the prompt and separate response areas per part with no requirement summary or hints. Practice like that here. When you’re done with both parts, click Reveal Solution & Scoring Rubric below to compare your code against the official rubric.

findFreeBlock.java Tab indents | Enter auto-indents | Brackets auto-close
Drag bottom-right corner to resize editor ⇲

Write Your Part B Response: makeAppointment

makeAppointment.java Tab indents | Enter auto-indents | Brackets auto-close
Drag bottom-right corner to resize editor ⇲

Ready to self-grade? Compare your code against the official 9-point rubric below. AP FRQs are graded by trained human readers, so we don’t auto-score — you’ll learn more by checking your work against the rubric criteria yourself.

What the Prompt Was Asking

Before reading the solution, check whether your response covered each of these requirements:

Write: public int findFreeBlock(int period, int duration) — Part A; public boolean makeAppointment(int startPeriod, int endPeriod, int duration) — Part B

Required behavior:

  • Part A findFreeBlock: iterate over necessary minutes (0 through 59), tracking contiguous free minutes. Reset the counter to 0 whenever a non-free minute is found. When the counter equals duration, calculate and return the starting minute (current minute - duration + 1).
  • Part A return logic: return the starting minute as soon as a valid block is found (don't keep searching). Return -1 only AFTER the loop completes with no block of the required duration.
  • Part B makeAppointment: loop period from startPeriod to endPeriod inclusive. For each period, call findFreeBlock; if it returns a valid minute (not -1), call reserveBlock and return true. Only return false AFTER the loop completes with no successful booking.

How to Write the AppointmentBook Methods Step-by-Step

// Sample solution adapted from official scoring guidelines
// 2023 AP CSA FRQ 1: AppointmentBook (worth 9 points)

public int findFreeBlock(int period, int duration) {
    int count = 0;
    for (int minute = 0; minute < 60; minute++) {
        if (isMinuteFree(period, minute)) {
            count++;
            if (count == duration) {
                // Found a block of length 'duration' ending at 'minute'
                return minute - duration + 1;
            }
        } else {
            count = 0;  // Non-free minute resets the run
        }
    }
    return -1;
}

public boolean makeAppointment(int startPeriod, int endPeriod, int duration) {
    for (int period = startPeriod; period <= endPeriod; period++) {
        int startMinute = findFreeBlock(period, duration);
        if (startMinute != -1) {
            reserveBlock(period, startMinute, duration);
            return true;
        }
        // Otherwise continue to the next period
    }
    return false;
}

Official 9-Point Scoring Rubric for AppointmentBook

Pts Criterion
+1 Loops over the 60 minutes of the period
+1 Calls isMinuteFree(period, minute) with valid arguments
+1 Tracks contiguous free minutes; resets the counter when a non-free minute is found
+1 Detects when the contiguous run reaches duration minutes
+1 Returns starting minute on success or -1 on failure (algorithm, Part A)
+1 Loops periods startPeriod to endPeriod inclusive
+1 Calls findFreeBlock and reserveBlock with correct arguments
+1 Guards reserveBlock with a check that the starting minute is not -1
+1 Returns appropriate boolean (true on first success, false if no period works, algorithm)

Common Mistakes That Cost Points on FRQ 1

Mistake 1: Returning from both the if and else branches inside the loop, exiting after one iteration. Sample 1A and Sample 1B in the official commentary both lost Point 9 because the response returns in BOTH branches of the conditional, so the loop runs exactly once. The correct pattern: return true only when a free block is found and reserved (inside the if); CONTINUE iterating when findFreeBlock returns -1. Place return false AFTER the loop, not in an else branch inside the loop.
Mistake 2: Failing to reset the contiguous-minutes counter when a non-free minute is found. Sample 1C in the official commentary lost Point 3 because count continues to be incremented even after an unavailable minute is encountered. The single-pass algorithm requires: increment counter when minute is free, RESET counter to 0 when minute is occupied. Without the reset, isolated free minutes are counted as if they were contiguous, giving a false positive on the duration check.
Mistake 3: Returning the wrong starting minute (off-by-one). Sample 1A in the official commentary lost Point 5 because when a block of length duration is found, the response did not immediately return the starting minute — it kept searching, allowing a different block to be found later. The correct formula at the moment count == duration is: return minute - duration + 1 (where minute is the current loop variable). This identifies the FIRST minute of the block, not the last.
Mistake 4: Missing the -1 guard in Part B. Sample 1B in the official commentary lost Point 8 because the guard does not compare a starting minute with -1. Before calling reserveBlock, you MUST check that findFreeBlock didn't return -1 — calling reserveBlock with -1 as the starting minute would book at an invalid position. The pattern: int minute = findFreeBlock(period, duration); if (minute != -1) { reserveBlock(...); return true; }
Mistake 5: Calling methods with type names in the arguments. Sample 1C in the official commentary lost Points 2 and 7 because calls like isMinuteFree(int period, int minute) include the parameter TYPES — that's method DEFINITION syntax, not method CALL syntax. To call a method, just pass the values: isMinuteFree(period, minute). Including the int keyword in front of arguments is a compile error and the rubric counts it as an incorrect call.
Key Insight: AppointmentBook teaches the two-tier search pattern that recurs across many AP CSA simulation FRQs: an inner method finds the first match in a single dataset (Part A: findFreeBlock searches one hour for a free block), and an outer method loops through datasets calling the inner method (Part B: makeAppointment loops through hours calling findFreeBlock for each). The critical structural insight: the OUTER loop must KEEP iterating when the inner method returns 'not found' — Sample 1A and 1B both lost Point 9 by returning in BOTH branches of the if/else, which exits after one iteration. The correct pattern returns true only on success (inside the if); on failure (inside the else, or implicit when no else), the loop CONTINUES to the next iteration. A second insight specific to single-pass contiguous-block algorithms (recurring in 2018 LightBoard, 2019 StepTracker variations, and many 1D-array FRQs): when scanning for K consecutive matches in a sequence, increment a counter on match and RESET to 0 on non-match. When the counter reaches K, you've found the block — its starting position is currentIndex - K + 1. Sample 1C lost Point 3 by failing to reset, which broke the contiguity check entirely. Reset on miss is the discipline that makes single-pass scanning correct.

FAQs About 2023 AP CSA FRQ 1

What does 2023 AP CSA FRQ 1 AppointmentBook test?

AppointmentBook tests two methods: findFreeBlock (Part A) iterates through 60 minutes of an hour using isMinuteFree to find the FIRST contiguous block of duration free minutes, returning the starting minute or -1; makeAppointment (Part B) loops through periods from startPeriod to endPeriod calling findFreeBlock then reserveBlock when a free block is found, returning a boolean. The hardest single point is Point 9: the loop in Part B must continue iterating through periods when no block is found — Sample 1A and 1B both lost Point 9 because of an early return in both if and else branches that exits the loop after one iteration.

How many points is FRQ 1 worth?

9 points, awarded across the rubric criteria. FRQ 1 makes up about 11% of the AP CSA exam score.

What is the most common mistake on 2023 FRQ 1 AppointmentBook?

Returning from BOTH the if and else branches inside the loop, causing the loop to exit after the first iteration. Sample 1A and Sample 1B in the official commentary both lost Point 9 because returning in both branches means the loop only ever runs once. The fix is to return ONLY when an appointment is successfully booked (inside the if), and continue iterating when findFreeBlock returns -1. The final return false belongs AFTER the loop, not inside it.

How long should I spend on FRQ 1?

Aim for 22 minutes per FRQ. The AP CSA free-response section is 90 minutes for 4 questions, so 22 minutes per question leaves a 2-minute buffer to review.

Is AppointmentBook still relevant for the 2026 AP CSA exam?

Yes. The current AP CSA 4-unit curriculum still tests method writing with loops and conditionals, so AppointmentBook is excellent practice for the 2026 exam format.

Where can I find the official scoring guidelines?

College Board publishes the official scoring guidelines as a PDF on AP Central. The rubric on this page mirrors those criteria. You can download the official scoring guidelines here.

Related AP CSA FRQs to Practice Next

If you found AppointmentBook useful, work through these next to lock in the same Java concepts:

Why 2023 FRQ 1 Still Matters for the 2026 AP CSA Exam

The 2026 AP CSA curriculum reorganized the topic list into 4 units, but the FRQ types stayed the same. 2023 FRQ 1 (AppointmentBook) tests method writing with loops and conditionals, which is still a core part of the exam. Practicing this question prepares you for the Bluebook digital test format and builds the muscle memory you need for the exam on Friday, May 15, 2026.

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

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]