Save
AP Computer Science Principles
Big Idea 3: Algorithms and Programming
3.1 Algorithm Development
Save
Share
Learn
Content
Leaderboard
Share
Learn
Cards (67)
What is an algorithm defined as?
Ordered steps to solve a problem
Steps to make a peanut butter sandwich
1️⃣ Gather bread, peanut butter, and a knife
2️⃣ Open the bread package and take out two slices
3️⃣ Spread peanut butter evenly on one slice
4️⃣ Place the second slice on top of the peanut butter
5️⃣ Cut the sandwich in half, if desired
6️⃣ Serve the sandwich
The finite termination property of an algorithm requires it to complete in a finite amount of
time
The steps in an algorithm transform the input into the
output
For what type of problems is the greedy paradigm best suited?
Optimization problems
Dynamic Programming
solves a complex problem by breaking it down into simpler
sub-problems
The
Greedy
technique makes locally optimal choices at each stage to find a global
optimum
The Binary Search algorithm is used to find a specific number in a sorted
list
An algorithm is a set of ordered steps that solves a specific
problem
Algorithmic paradigms are high-level approaches to designing
algorithms
What is the main characteristic of the Brute Force algorithmic paradigm?
Enumerates all solutions
What is the key advantage of Dynamic Programming?
Guarantees an optimal solution
The Divide-and-Conquer
paradigm
is effective for problems that can be easily divided into independent sub-problems.
True
Brute Force involves systematically trying all
possible
solutions until the correct one is found.
True
What is the input for the Bubble Sort algorithm?
List of numbers
The first problem in this study material is to sort a list of numbers in ascending
order
The input for the Bubble Sort
algorithm
is a list of numbers
True
The searching algorithm used in this study material is
Binary
Search
In the Binary Search pseudocode, the left index is initialized to
0
What happens in the Binary Search algorithm if the middle element is the target?
Return middle index
The space complexity of the Bubble Sort algorithm is
O(1)
True
The choice of algorithm depends on the specific problem, the size of the input, and the trade-offs between time and
space
complexity.
Instructions in an algorithm must be executed in a specific
sequence
.
True
What does the input of an algorithm represent?
The data the algorithm operates on
Match the algorithmic paradigm with its description:
Brute Force ↔️ Enumerates all possible solutions
Divide-and-Conquer ↔️ Breaks a problem into sub-problems
Greedy ↔️ Makes locally optimal choices
Dynamic Programming ↔️ Stores solutions to avoid recomputation
The choice of algorithmic paradigm depends on the problem's constraints and desired
properties
.
True
The
Brute Force
technique systematically tries all possible
solutions
Steps of the Bubble Sort algorithm
1️⃣ Compare adjacent elements
2️⃣ Swap if necessary
3️⃣ Repeat until sorted
Steps of the Binary Search algorithm
1️⃣ Calculate middle index
2️⃣ Compare middle element to target
3️⃣ Adjust search range
4️⃣ Repeat until found or exhausted
Match the algorithm component with its description:
Input ↔️ Data the algorithm operates on
Output ↔️ Desired result produced by the algorithm
Steps ↔️ Precise instructions to transform input
Termination ↔️ Algorithm completes in finite steps
The Greedy paradigm makes locally optimal choices in the hope of finding a global
optimum
The Greedy paradigm makes locally optimal choices but does not guarantee a globally optimal
solution
For what type of problems is the Brute Force paradigm most suitable?
Small, simple problems
Dynamic Programming stores solutions to avoid
recomputing
Dynamic Programming is used for problems with overlapping sub-problems and optimal
substructure
What is the purpose of this study material?
Practice algorithm development
What is the problem addressed in the second part of this study material?
Searching for a number
What is the output of the Binary Search algorithm if the target number is not found?
-1
The Binary Search algorithm continues while the left index is less than or equal to the
right index
True
What algorithm is used to search for a specific number in a sorted list?
Binary Search
See all 67 cards
See similar decks
3.1 Algorithm Development
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
66 cards
3.1 Algorithm Development
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
38 cards
3.1 Algorithm Development
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
75 cards
3.1 Algorithm Development
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
62 cards
3.1 Algorithm Development
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
62 cards
Big Idea 3: Algorithms and Programming
AP Computer Science Principles
575 cards
AP Computer Science Principles
1196 cards
3.7 Program Documentation
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
69 cards
3.4 Functions and Procedures
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
43 cards
3.3 Control Structures
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
119 cards
3.5 Lists and Arrays
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
88 cards
3.2 Variables and Data Types
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
126 cards
3.6 Debugging and Testing
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
63 cards
2.1 Algorithms
OCR GCSE Computer Science
207 cards
3.1.3 Searching algorithms
AQA GCSE Computer Science > 3.1 Fundamentals of algorithms
25 cards
2.1.3 Searching and Sorting Algorithms
OCR GCSE Computer Science > 2.1 Algorithms
59 cards
3.1.4 Sorting algorithms
AQA GCSE Computer Science > 3.1 Fundamentals of algorithms
114 cards
1.4.3 Algorithms
OCR A-Level Computer Science > 1.4 Data types, data structures and algorithms
39 cards
2. Algorithms
OCR A-Level Further Mathematics > Optional Papers > Discrete Mathematics
120 cards
5.3 Algorithms
AQA A-Level Further Mathematics > Optional Application 3 – Discrete Mathematics
44 cards
Big Idea 1: Creative Development
AP Computer Science Principles
94 cards