2.3.1(f) Binary Search

Passage
•
Computers
•
12th Grade
•
Easy
RHSC Computing
Used 1+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is binary search used for?
Calculating the sum of all elements in an array
Finding a target value in an unsorted array
Sorting an array in ascending order
Finding a target value in a sorted array
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does binary search reduce the search area?
By eliminating one value at a time
By eliminating one third of the remaining values
By randomly selecting a new search area
By eliminating half of the remaining values
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial step in a binary search algorithm?
Selecting the leftmost value of the array
Selecting the rightmost value of the array
Sorting the array
Finding the middle value of the array
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the value at mid is greater than the target?
The search continues with values less than mid
The search continues with values greater than mid
The algorithm restarts from the beginning
The algorithm returns the mid index
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of binary search?
O(n)
O(n log n)
O(log n)
O(1)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the binary search algorithm return if the target is not found?
-1
The index of the closest value
The last index searched
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is the 'mid' index calculated in binary search?
By averaging the left and right indices and rounding up
By averaging the left and right indices and rounding down
By selecting the leftmost index
By selecting the rightmost index
Similar Resources on Wayground
11 questions
40. Algorithm - Algorithm Efficiency Quiz

Quiz
•
9th - 12th Grade
10 questions
Small Basic (Turtle)

Quiz
•
KG - University
9 questions
Checkpoint 1 revision

Quiz
•
9th - 12th Grade
10 questions
Arrays and Lists

Quiz
•
6th - 12th Grade
10 questions
Number System

Quiz
•
11th - 12th Grade
12 questions
Sains Komputer Tingkatan 5 - 3.1.3 Menggunakan pemalar..

Quiz
•
10th - 12th Grade
12 questions
Test-1 S.Y.B.Sc.(CS)Div.-A DS-II

Quiz
•
12th Grade
10 questions
Year 8 Quiz 1

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade