

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
12 questions
Ocean Circulation and Climate
Presentation
•
10th - 12th Grade
13 questions
Hacking
Presentation
•
9th - 12th Grade
13 questions
Ilmu Pengetahuan Alam
Presentation
•
KG
15 questions
Media Terminology & Copyright Law 2023
Presentation
•
9th - 12th Grade
12 questions
Ecological Succession
Presentation
•
9th - 12th Grade
12 questions
Tragedy of the Commons
Presentation
•
9th - 12th Grade
15 questions
What are Watersheds?
Presentation
•
10th - 12th Grade
16 questions
Magnetism Notes
Presentation
•
10th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade