C++ Quiz 5: Searching and Sorting Algorithms

Quiz
•
Computers
•
7th - 12th Grade
•
Medium
Jerry Xiao
Used 147+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Linear search algorithm:
Scans each index until finding a matching value
Repeatedly dividing in half the array until found
Bubble sorting technique
None of them
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Linear Search works when the array is?
Sorted
Unsorted
Both
None of the above
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
A binary search algorithm can be best described as what?
A instant lookup method
Repeatedly dividing in half the array until found
Start at the head, move through the list until found
None of the above
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
When is Binary Search preferred over Linear Search?
Small Database
Sorted Database
Unsorted Database
None of the above
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Using binary search in this sorted array:
3 7 10 45 84 100 153 170
How many comparisons would it take to find number 170?
0 – 1
1 – 2
3 – 4
4 – 5
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
The maximum comparisons needed in Binary Search on array of size 16 is:
16
8
4
5
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
The maximum comparisons needed in Linear Search on array of size 32 is:
32
33
16
31
8.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Insertion sort is a sorting algorithm in which the elements are transferred one at a time to the right position
True
False
9.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the first change that insertion sort would make to this sequence?
“6 2 5 9”
6 9 5 2
5 9 6 2
9 5 2 6
2 6 5 9
Similar Resources on Wayground
14 questions
AP CSP Unit 10 Code.org

Quiz
•
11th Grade
10 questions
Asas Sains Komputer T3 : BAB 3: Pembangunan Algoritma

Quiz
•
12th Grade
10 questions
ASK T3 BAB 3

Quiz
•
9th Grade
10 questions
CS Edexcel 1.2c - Linear and Binary Search

Quiz
•
9th - 10th Grade
6 questions
Search Algorithm Recap

Quiz
•
11th Grade
14 questions
7.5 Search Algorithms

Quiz
•
12th Grade
10 questions
Search Algorithms

Quiz
•
9th - 12th Grade
10 questions
GCSE Computer Science 9-1: Sorting Algorithms

Quiz
•
10th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade