Which of the following is true about binary search?
Data Structures and Algorithms Quiz

Quiz
•
Computers
•
University
•
Hard
Ajay (RCSS)
Used 3+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A) It works on both sorted and unsorted arrays
B) It requires the array to be sorted
C) It is slower than linear search for large inputs
D) It does not use recursion
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the best case scenario for binary search?
A) When the target element is in the last position
B) When the target element is in the middle position
C) When the array is unsorted
D) When the target element is not found
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which search algorithm works well for small and unsorted datasets?
A) Linear Search
B) Binary Search
C) Both A and B
D) None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If an array has 1000 elements, how many elements does linear search check in the worst case?
A) 10
B) 100
C) 500
D) 1000
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which search algorithm can work efficiently on linked lists?
A) Binary Search
B) Linear Search
C) Both A and B
D) None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operation is performed at the top of a stack?
A) Push
B) Pop
C) Both A and B
D) Peek
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Stacks follow which order of element access?
A) FIFO
B) LIFO
C) Random
D) Circular
Create a free account and access millions of resources
Similar Resources on Quizizz
40 questions
Java-Collections

Quiz
•
University
37 questions
Self Assessment on Data Structures

Quiz
•
University
40 questions
Data Structures

Quiz
•
University
41 questions
Section 3: Scheduling (21-25)

Quiz
•
University
45 questions
STACK DATA STRUCTURE

Quiz
•
University
42 questions
UTS Algoritma dan Pemrograman

Quiz
•
University
44 questions
Design and Analysis of Algorithms

Quiz
•
University
44 questions
Data Structures Quiz

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade