Time Complexity Quiz

Time Complexity Quiz

University

40 Qs

quiz-placeholder

Similar activities

CU 5 Server Maintenance (Beatrice)

CU 5 Server Maintenance (Beatrice)

University

38 Qs

WPR MidTerm

WPR MidTerm

University

39 Qs

PrT FD - 5A PNM 2022

PrT FD - 5A PNM 2022

University

35 Qs

SCRUM MASTER CERTIPROF 1

SCRUM MASTER CERTIPROF 1

University - Professional Development

40 Qs

LearnTube Data Structure and Algorithm Quiz 11/2/23

LearnTube Data Structure and Algorithm Quiz 11/2/23

University

42 Qs

Take Flight Jet Book 1

Take Flight Jet Book 1

6th Grade - University

35 Qs

Codestorm - Kriya 2025

Codestorm - Kriya 2025

University

40 Qs

Database Systems Final Exam

Database Systems Final Exam

University

40 Qs

Time Complexity Quiz

Time Complexity Quiz

Assessment

Quiz

Other

University

Hard

Created by

Nathaniel Mensah

Used 1+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity to access an element at a given index in an array?

O(1)

O(n)

O(log n)

O(n log n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity for inserting an element at the beginning of a dynamic array (vector) of size n?

O(1)

O(log n)

O(n)

O(n²)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity for inserting a node at the head of a singly linked list?

O(1)

O(n)

O(log n)

O(n log n)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity for searching an element in a singly linked list?

O(1)

O(n)

O(log n)

O(n log n)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity for push and pop operations in a stack (whether implemented using an array or linked list)?

O(1)

O(n)

O(log n)

O(n log n)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a queue implemented with a linked list, what is the time complexity for both enqueue and dequeue operations?

O(1)

O(n)

O(log n)

O(n log n)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a hash table using chaining, what is the average-case time complexity for search operations?

O(1)

O(n)

O(log n)

O(n 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?