
Binary search Quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Easther Tie
Used 4+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. In which of the following cases, binary search algorithm is used?
To search an element in an unordered list.
To search an element in a list of few elements.
To search an element in any ordered list with large number of elements
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. How does a binary search algorithm works?
Dividing the list into halves until the item is matched with one in the list.
Starts with the first element and checks the next element consecutively until a match is found.
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. An array with 32 elements is input to a binary search algorithm. How many maximum number of comparisons are performed?
32
8
16
5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. An array with 32 elements is input to a linear search algorithm. How many maximum number of comparisons are performed?
32
8
16
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. How is the midpoint of the list calculated?
midpoint= round ((first_element+last_element)/2)
midpoint= round ((lower_bound+upper_bound)/2)
midpoint=(lower_bound+upper_bound)/2
midpoint= round ((lower_bound+upper_bound))
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6. Complete the sentence: The lower half of the list is discarded if the value at midpoint is …………………….. item searched.
less than
equal to
greater than
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7. True or False: The upper half of the list is discarded if the value at midpoint is greater than item searched.
true
false
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
8. What is the disadvantage of binary search algorithm?
It takes longer time when compared to linear search algorithm
It is very complex to understand
It works only on sorted lists
Similar Resources on Wayground
10 questions
Списки Python + Pygame
Quiz
•
KG - University
13 questions
Functional Programming
Quiz
•
University
10 questions
Pengenalan Digital Marketing
Quiz
•
KG - Professional Dev...
10 questions
Creating tables in HTML
Quiz
•
University
11 questions
Trees
Quiz
•
University
10 questions
Website Usability and UX
Quiz
•
University
10 questions
System Analysis & Design
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
