Time Complexity Quiz

Time Complexity Quiz

University

40 Qs

quiz-placeholder

Similar activities

DSA Quiz 4th Semster CE

DSA Quiz 4th Semster CE

University

40 Qs

Tsukunomey

Tsukunomey

University

45 Qs

CC104 - Final Exam

CC104 - Final Exam

University

43 Qs

Linked List and Stack Quiz

Linked List and Stack Quiz

University

40 Qs

physical pharmacy

physical pharmacy

University

35 Qs

maths

maths

4th Grade - Professional Development

43 Qs

TECHNICAL QUIZ

TECHNICAL QUIZ

University

45 Qs

Data Structures and Sorting Algorithms - Midterm

Data Structures and Sorting Algorithms - Midterm

University

45 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?