

AP CSP Unit 6 Review 1
Presentation
•
Science, Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Standards-aligned

Ruth Page
Used 369+ times
FREE Resource
1 Slide • 18 Questions
1
AP CSP Unit 6 Review
Algorithms

2
Multiple Select
What does an algorithm need to be (choose all that apply)?
Clear instructions
Accurate
Easy to understand
Complex
3
Multiple Choice
Which of the following is an example of the use of heuristics?
Trying every possible combination of letters when unscrambling a word
Considering each possible move when playing chess
Using the formula “area=length x width” to find the area of a rectangle
Playing chess using a defensive strategy that has often been successful for you
4
Multiple Choice
A binary search is to be performed on the list:
3, 5, 9, 10, 23
How many comparisons would it take to find the number 9?
1
3
4
It can't find the number 9
5
Multiple Choice
A linear search is to be performed on the list:
12, 6, 8, 1, 3
How many comparisons would it take to find the number 1?
1
2
3
4
6
Multiple Choice
Identify the description of a binary search.
Put the elements in order, check each item in turn
Order elements,compare middle value,split list in order&loop
Elements do not need to be in order, check each item in turn
Randomize data, compare middle value, split list in order & loop
7
Multiple Choice
Identify the description of a linear search.
Put the elements in order, check each item in turn
Order elements,compare middle value,split list in order&loop
Elements do not need to be in order, check each item in turn
Randomize data, compare middle value, split list in order & loop
8
Multiple Choice
What is the largest number of comparisons needed to perform a binary search on an array with 42 elements?
2
5
6
41
42
9
Multiple Choice
We are searching for a number key in a sorted list that has n elements. Under what circumstances will Linear Search / Sequential Search be more efficient than Binary Search?
key is the last element in the array
key is in the middle of the array
n is very large
key is the first element in the array
key does not exist in the array
10
Multiple Choice
A robot is programming a new game called “Open the box!” You give him a number and he tries to open a numbered box. He’s using Binary Search to accomplish this. Unfortunately, the boxes are not sorted. They are in the following order:
1, 3, 6, 9, 14, 10, 21
Which box can NEVER be found using binary search?
9
6
14
10
11
Multiple Choice
Given this array:
1, 2, 4, 5, 6, 7, 8, 12, 14, 21, 22, 42, 53
How many comparisons are required to find 42 using the Linear Search / Sequential Search?
3
2
12
5
12
Multiple Choice
Given this list:
1, 2, 4, 5, 6, 7, 8, 12, 14, 21, 22, 42, 53
How many comparisons are required to find 42 using the Binary Search?
3
2
10
5
13
Multiple Choice
True or false: If an array is already sorted, Linear Search / Sequential Search is more efficient than Binary Search.
True
False
14
Multiple Choice
What must be true before performing a binary search?
The elements must be sorted.
It can only contain binary values.
The elements must be some sort of number (i.e. int, double, Integer)
There are no necessary conditions.
15
Multiple Choice
You are at the yellow arrow, pointing in the direction indicated. How would you move to fill in the 2 black squares?
Straight x 1, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square
Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square
Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn right, Straight x 1, Fill Square
Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 2, Fill Square
16
Multiple Select
What's the difference between a flow chart and pseudocode? (choose all that apply)
Nothing
Flow chart uses symbols
Pseudocode is more colorful
Flow chart has data flow arrows
Pseudocode and flow charts both use arrows for data flow
17
Multiple Choice
If it is AFTER 7am, what do you need to do?
Take the bus
Take the subway
Check the time
Leave home
18
Multiple Choice
Which of these does NOT represent an algorithm?
Following recipe instructions
Working out how an engine works
Tying your shoelaces
Making a cup of coffee
19
Multiple Choice
What is one purpose of pseudocode?
To program a computer
So we can see the different symbols
It helps us with the variables
It helps us plan the code
Flow charts are helpful to us when planning
AP CSP Unit 6 Review
Algorithms

Show answer
Auto Play
Slide 1 / 19
SLIDE
Similar Resources on Wayground
11 questions
P-T Diagram Group Practice
Presentation
•
9th - 12th Grade
14 questions
Legacy of Corruption
Presentation
•
9th - 12th Grade
14 questions
Mutations
Presentation
•
9th - 12th Grade
13 questions
DE_Chem_2.2.2
Presentation
•
9th - 12th Grade
13 questions
Chemistry of Life
Presentation
•
9th - 12th Grade
15 questions
Biological and Social Hazards Lesson
Presentation
•
9th - 12th Grade
18 questions
Cell Structures/Organelles
Presentation
•
9th - 12th Grade
17 questions
Python Data Types and Variables
Presentation
•
8th - 12th Grade
Popular Resources on Wayground
10 questions
Oak Hills High School Policy and Success Quiz
Passage
•
9th Grade
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
15 questions
School Bus Safety Questions
Quiz
•
6th Grade
25 questions
AJHS Scavenger Hunt
Quiz
•
6th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
22 questions
would you rather
Quiz
•
3rd - 11th Grade
29 questions
Laboratory Safety Rules
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
Discover more resources for Science
73 questions
Reading Graphs
Quiz
•
9th - 12th Grade
10 questions
Scientific Method (The scientific method)
Interactive video
•
9th Grade
9 questions
Scientific method
Interactive video
•
9th - 12th Grade
10 questions
Lab Safety Essentials
Interactive video
•
6th - 10th Grade
33 questions
Lab Safety
Quiz
•
9th - 12th Grade
24 questions
Flinn Lab Safety Quiz
Quiz
•
5th - 12th Grade
10 questions
Exploring Common Lab Equipment
Interactive video
•
6th - 10th Grade
12 questions
What is Biology?
Presentation
•
9th - 12th Grade