Algorithms & Programming: every key term you need (+ practice quiz)
38 flashcard terms for AP Computer Science Principles Unit 3, written to match the course framework. Read them here, drill them as flashcards, or take the 19-question quiz. Free, no account needed.
Virtual Private Network creates encrypted tunnel for secure remote communication.
Open Source
Software with publicly available source code; allows inspection and modification.
Linear Search
Checks each element in order until the target is found; works on unsorted lists and takes up to n comparisons.
Binary Search
Repeatedly halves a sorted list to locate a target; needs about log2(n) comparisons, so 1,000 items take at most 10 checks.
Reasonable Time
An algorithm whose steps grow polynomially (like n or n^2) with input size; exponential growth (2^n) is unreasonable.
Heuristic
An approach that finds a good-enough solution quickly when an exact solution would take unreasonable time, e.g. nearest-neighbor for the traveling salesperson.
Undecidable Problem
A problem for which no algorithm can give a correct yes/no answer for every input; the halting problem is the classic example.
Procedure (Function)
Named block of code that may take parameters and return a value; using it is procedural abstraction.
Procedural Abstraction
Calling a procedure by name without knowing its internal steps, which reduces complexity and duplication.
Parameter vs. Argument
A parameter is the variable named in the procedure definition; an argument is the actual value passed in when it is called.
Return Value
The result a procedure sends back to the caller; execution of the procedure stops at RETURN.
Selection
Using IF / IF-ELSE to choose which statements execute based on a Boolean condition.
Iteration
Repeating statements with REPEAT n TIMES or REPEAT UNTIL(condition); the loop body must eventually make the condition true.
Boolean Expression
Expression evaluating to true or false, combined with AND, OR, NOT; AND is true only if both parts are true.
List Traversal
Visiting each element of a list, often with FOR EACH item IN list, to search, sum, or filter.
Off-by-one Error
A logic bug where a loop runs one time too many or too few, frequently at list boundaries since AP lists start at index 1.
Simulation
Program that models a real-world process by simplifying it, letting users test scenarios that would be costly or dangerous in reality.
Random Number Use
RANDOM(a, b) returns an integer from a to b inclusive; used in simulations and games to model unpredictable events.