 Algorithm
a year ago
sharvey449
Save
Edit
Host a game
Live GameLive
Homework
Solo Practice
Practice 16 QuestionsShow answers
• Question 1
30 seconds
Q. If the data is in order the best search to use would be a
Binary Search
Linear Search
• Question 2
30 seconds
Q. What is Decomposition?
•– the use of computers to solve problems.
representing 'real world' problems in a computer using variables and symbols and removing unnecessary elements from the problem
•breaking down a large problem into smaller sub-problems.
•identifying the steps involved in solving a problem.
• Question 3
30 seconds
Q. 'The worst case scenario is you have to check all the values' is a disadvantage for a
Linear Search
Binary Search
• Question 4
30 seconds
Q. 'The algorithm is longer and more complex to write' is a disadvantage for a
Binary Search
Linear Search
• Question 5
10 seconds
Q. Linear Search is faster than Binary search
TRUE
FALSE
It depends on the scenario
• Question 6
10 seconds
Q. On average, which searching algorithm is more efficient?
Binary Search
Linear Search
• Question 7
30 seconds
Q. How many linear searches will it take to find the value 7 in the list [1,4,8,7,10,28]?
2
3
4
5
• Question 8
30 seconds
Q. How many binary searches will it take to find the value 10 in the list [1,4,9,10,11]?
0
1
2
3
• Question 9
20 seconds Q. What is an advantage of the Linear search algorithm?
Performs well with small sized data sets
Can be used on data sets with more than a million elements
Is complicated to code
• Question 10
20 seconds Q. A Linear search algorithm requires data to be ordered.
True
False
• Question 11
30 seconds
Q. If you have a large amount of data to search through the best algorithm would be a
Binary Search
Linear Search
• Question 12
30 seconds
Q. If the data is in order the best search to use would be a
Binary Search
Linear Search
• Question 13
30 seconds
Q. An algorithm is...
A set of steps to follow in order
When you sort data into the correct order
When you search data for a specific entity
• Question 14
30 seconds
Q. Which of these is NOT a search algorithm
Binary
Linear
Bubble
• Question 15
30 seconds
Q. An algorithm is...
A set of steps to solve a problem
When you sort data into the correct order
When you search data for a specific value
Any written code
• Question 16
30 seconds
Q. How many comparisons would it take to find the value 2 in the following list using a binary search?
[1, 4, 7, 8, 5, 2, 9]