Algorithm Time Complexity Quiz

Algorithm Time Complexity Quiz

University

20 Qs

quiz-placeholder

Similar activities

Computer Networks CT-4

Computer Networks CT-4

University

20 Qs

Understanding Stacks and Queues in Java

Understanding Stacks and Queues in Java

University

15 Qs

Natural Language Processing CT-2

Natural Language Processing CT-2

University

20 Qs

Manufacturing Technology Quiz

Manufacturing Technology Quiz

11th Grade - University

20 Qs

DAA 4th Sem

DAA 4th Sem

University

20 Qs

Qualifier Set B

Qualifier Set B

University

25 Qs

Mastering Data Structures

Mastering Data Structures

University

21 Qs

NLP_B1_19.09

NLP_B1_19.09

University

20 Qs

Algorithm Time Complexity Quiz

Algorithm Time Complexity Quiz

Assessment

Quiz

Engineering

University

Hard

Created by

Dr. Vasanthi

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of a linear search algorithm?

O(n)

O(log n)

O(n log n)

O(1)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which asymptotic notation gives the upper bound of an algorithm's time complexity?

Big-O

Big-Ω

Big-Θ

None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity of a binary search algorithm?

O(n)

O(log n)

O(n log n)

O(1)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which algorithm has a time complexity of O(n^2)?

Bubble sort

Selection sort

Insertion sort

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the best-case time complexity of a heap sort algorithm?

O(n)

O(log n)

O(n log n)

O(1)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure is used in a heap sort algorithm?

Array

Linked list

Stack

Queue

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of a naive string-matching algorithm?

O(n)

O(n^2)

O(n log n)

O(1)

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?