Which search algorithm has a time complexity of O(log n)?

AHJN: Unit19-Computational Thinking

Quiz
•
Computers
•
12th Grade
•
Hard
Ahmad Janoudi
FREE Resource
38 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Binary search
Linear search
Bubble sort
Insertion sort
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a necessary condition for using a binary search algorithm?
The data must be sorted
The data must be stored in a linked list
The data must contain only numeric values
The data must be stored in a queue
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT an abstract data type (ADT)?
Stack
Queue
Binary tree
Algorithm
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What notation is commonly used to compare the efficiency of algorithms?
Big O notation
Little O notation
Alpha-beta notation
Theta notation
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a linear search algorithm, what is the worst-case time complexity when searching through n elements?
O(n)
O(log n)
O(1)
O(n²)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about binary search is correct?
It has a worst-case time complexity of O(log n)
It always requires more comparisons than linear search
It can be used on unsorted data
It requires a linked list data structure
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many comparisons would a binary search require in the worst case to find a value in a sorted array of 1024 elements?
10
11
512
1024
Create a free account and access millions of resources
Similar Resources on Wayground
37 questions
AQA Computer Science GCSE - 3.3 Data representation

Quiz
•
10th - 12th Grade
42 questions
Algorithms

Quiz
•
12th Grade
36 questions
Struktur Data dalam Pembuatan Gim

Quiz
•
12th Grade - University
40 questions
Code Uncode 2.0

Quiz
•
12th Grade
35 questions
CS Unit 10 Data Types Key words

Quiz
•
12th Grade
35 questions
Python - 2.தரவு அருவமாக்கம்

Quiz
•
12th Grade
34 questions
Competitive Programming: Intro to the Arts of Problem Solving

Quiz
•
9th - 12th Grade
40 questions
A Level Quiz

Quiz
•
12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade