C++ Quiz 5: Searching and Sorting Algorithms
Quiz
•
Computers
•
7th - 12th Grade
•
Practice Problem
•
Medium
Jerry Xiao
Used 149+ times
FREE Resource
Enhance your content in a minute
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
11 questions
Computer System Servicing Quiz No. 2 Sir Santi
Quiz
•
10th Grade
10 questions
Browser, Search Engine, Email
Quiz
•
7th Grade
12 questions
Vyhledávání na internetu
Quiz
•
9th - 12th Grade
12 questions
Sumatif Harian 3
Quiz
•
7th Grade
10 questions
Fundamentos PHP (Manejo de Fomularios y arreglos)
Quiz
•
9th Grade
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
11 questions
Digital Systems Vocab Quiz
Quiz
•
7th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
