Skip to main content

AP Computer Science Principles, AP exams, 30–35%

Big Idea 3: Algorithms and Programming

Big Idea 3 carries the largest published weighting in the course. It covers variables, data abstraction, Boolean logic, conditionals, iteration, lists, procedures, libraries, simulation, and algorithmic efficiency. Exam questions use College Board's pseudocode rather than any particular language, so fluency in reading that notation is essential.

Big Idea 3: Algorithms and Programming at a glance

Position
3 of 5 units
Published weighting
30–35% in the official framework
Topics covered
7 topics in this guide

What is covered

Topics inside this unit.

These topics describe the scope students most often review for this part of AP Computer Science Principles. Treat them as a study checklist rather than an exhaustive list of what a single exam form can sample.

Variables, assignment, and data abstraction
Storing and updating values, and using lists and other structures to manage complexity.
Boolean expressions and conditionals
Relational and logical operators, if and else structures, and nested conditionals.
Iteration
Repeat loops and loops over lists, including nested iteration and traversal patterns.
Developing and testing algorithms
Building algorithms from sequencing, selection, and iteration, and testing them against edge cases.
Lists, searching, and sorting
List operations and traversals, plus linear and binary search and what each requires.
Procedures, libraries, and simulation
Writing and calling procedures with parameters and return values, using libraries, and modeling with random values.
Algorithmic efficiency and undecidable problems
Reasonable versus unreasonable running times, heuristics, and problems no algorithm can solve.

Study tips

How to practice Algorithms and Programming.

Section-specific guidance that follows from how this material is usually tested.

  • Trace pseudocode by hand with a variable table; the exam rewards careful tracing more than clever reading.
  • Practice both the block-based and text-based versions of College Board's pseudocode, since either can appear.
  • Give this big idea the most review time; its published weighting is the largest of the five.

Where this fits

Big Idea 3: Algorithms and Programming is 3 of 5 units in the AP Computer Science Principles guide, and it carries a published weighting of 30–35% in the official framework. Use the full guide to balance it against everything else you have to review.

Sample Algorithms and Programming questions

Practice questions, not yet expert-reviewed

Original practice questions written to the published framework for this section. No expert has reviewed them, and they are not taken from any official exam. Try each one before you open the answer.

  1. Question 1Foundational

    In College Board pseudocode, the list numbers contains the values 4, 8, 15, and 16 in that order. What value does numbers[2] represent?

    1. A8
    2. B4
    3. C15
    4. DNothing, because the index is out of range
    Show answer

    Answer: A. 8

    AP pseudocode lists are indexed starting at 1, so numbers[1] is 4 and numbers[2] is 8. Answering 15 assumes indexing starts at 0, which is the convention in many programming languages but not on this exam.

    Key insight: In AP Computer Science Principles pseudocode the first element of a list is at index 1.

  2. Question 2Foundational

    What must be true about a list before a binary search can be used on it?

    1. AThe list must be sorted
    2. BThe list must contain only numbers
    3. CThe list must contain no duplicate values
    4. DThe list must have an even number of elements
    Show answer

    Answer: A. The list must be sorted

    Binary search works by discarding half the remaining list at each step, which is only valid if order guarantees where the target can be. Duplicates, data type, and list length do not affect correctness; an unsorted list does, because the halving decision becomes meaningless.

    Key insight: Binary search buys speed with an assumption: the data must already be in order.

  3. Question 3Intermediate

    In College Board pseudocode the following statements are executed: sum ← 0; REPEAT 4 TIMES { sum ← sum + 3 }; DISPLAY(sum). What value is displayed?

    1. A12
    2. B7
    3. C4
    4. D3
    Show answer

    Answer: A. 12

    The loop body runs four times and each pass adds 3 to sum, so the final value is 4 times 3 = 12. Answering 7 adds 3 and 4 rather than repeating the addition, and answering 3 reports the value after a single pass.

    Key insight: Trace a loop with a table of values; a repeated addition is multiplication in disguise.

  4. Question 4Intermediate

    In College Board pseudocode, what is the value of the expression (a > 5) AND (NOT (b = 3)) when a = 7 and b = 4?

    1. Atrue
    2. Bfalse
    3. CAn error occurs, because = is the assignment operator
    4. DIt cannot be determined from the information given
    Show answer

    Answer: A. true

    The first condition is true because 7 > 5, and b = 3 is false because b holds 4, so NOT (b = 3) is true. An AND expression is true only when both operands are true, which they both are here. Assignment in AP pseudocode uses ←, which leaves = free as the comparison operator.

    Key insight: Evaluate the innermost condition first, apply NOT, and only then combine with AND.

  5. Question 5Advanced

    An algorithm requires about 2^n steps for an input of size n. How is that running time classified in AP Computer Science Principles?

    1. AUnreasonable, because the number of steps grows exponentially
    2. BReasonable, because the steps grow as a polynomial
    3. CReasonable, because the number of steps is constant
    4. DUndecidable, because no algorithm can solve the problem
    Show answer

    Answer: A. Unreasonable, because the number of steps grows exponentially

    The course calls a running time reasonable when it grows no faster than a polynomial in the input size, so exponential growth such as 2^n is unreasonable. Unreasonable is not the same as undecidable: a solution exists here, it simply becomes impractical as n grows, which is why heuristics are used instead.

    Key insight: Reasonable time means polynomial growth; exponential growth is unreasonable but still solvable in principle.

Continue through AP Computer Science Principles

Practice Algorithms and Programming deliberately.

Create your Arcade Academy workspace to turn this topic list into spaced-repetition reviews, linked notes, and progress you can act on.

Create your account