Linked and Binary Search

Linked and Binary Search

University

24 Qs

quiz-placeholder

Similar activities

TREES

TREES

University

20 Qs

Beginner Quiz on ML and Python Basics

Beginner Quiz on ML and Python Basics

University

20 Qs

AJP - UNIT I - DESIGN PATTERNS

AJP - UNIT I - DESIGN PATTERNS

University

20 Qs

Searching Algorithms

Searching Algorithms

University

26 Qs

Data Structure With C++

Data Structure With C++

University

20 Qs

New DSC Quiz

New DSC Quiz

University

20 Qs

Quiz on Standard Algorithms

Quiz on Standard Algorithms

10th Grade - University

20 Qs

C++ Arrays Week 2

C++ Arrays Week 2

University

20 Qs

Linked and Binary Search

Linked and Binary Search

Assessment

Quiz

Computers

University

Hard

Created by

Ravibalan undefined

Used 9+ times

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What is the worst-case time complexity of a linear search?

O(log n)

O(n)

O(1)

O(n log n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which of the following cases does linear search perform the best?

When the element is at the middle

When the array is sorted

When the element is not present

When the element is at the first position

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a characteristic of linear search?

It can be applied on unsorted data

It performs better on large datasets than binary search

It is simple and easy to implement

It checks elements sequentially

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many comparisons are made in the worst-case linear search in an array of size n?

1

log n

n

n/2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of data is most suitable for linear search?

Sorted arrays only

Only strings

Linked lists or small unsorted datasets

Binary trees

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary condition for applying binary search?

Array must contain integers only

Array must be unsorted

Array must be sorted

Array must contain non-repeating elements

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the average case time complexity of binary search?

O(n)

O(n log n)

O(1)

O(log n)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?