Binary search
Quiz
•
Other
•
11th Grade
•
Practice Problem
•
Hard
Yrysjan Shakhimova
Used 383+ times
FREE Resource
Enhance your content in a minute
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
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
20 sec • 1 pt
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
20 sec • 1 pt
An array with 32 elements is input to a binary search algorithm. How many maximum number of comparisons are performed?
32
16
8
5
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
An array with 32 elements is input to a linear search algorithm. How many maximum number of comparisons are performed?
32
16
8
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is the midpoint of the list calculated?
midpoint= round ((first_element+last_element)/2)
midpoint=(lower_bound+upper_bound)/2
midpoint= round ((lower_bound+upper_bound)/2)
midpoint= round ((lower_bound+upper_bound))
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Under which of the following conditions, binary search algorithm terminates?
Item_found=true
lower_bound <= upper_bound
lower_bound > upper_bound
A or C
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Complete the sentence: The lower half of the list is discarded if the value at midpoint is …………………….. item searched.
less than
greater than
equal to
8.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
True or False: The upper half of the list is discarded if the value at midpoint is greater than item searched.
True
False
9.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the disadvantage of binary search algorithm?
It takes longer time when compared to linear search algorithm
It works only on sorted lists
It is very complex to understand
Similar Resources on Wayground
10 questions
Flags (Hard) Pt.2
Quiz
•
3rd Grade - University
11 questions
INFERENCES and CONCLUSIONS
Quiz
•
9th Grade - University
14 questions
Solidworks Terminology
Quiz
•
9th - 12th Grade
12 questions
Musical Elements 1
Quiz
•
8th - 12th Grade
11 questions
CEFR
Quiz
•
11th Grade
10 questions
Windows 10
Quiz
•
8th Grade - University
10 questions
APA Referencing
Quiz
•
KG - University
10 questions
Zdania złożone współrzędnie
Quiz
•
1st Grade - University
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
Discover more resources for Other
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University
