Search Header Logo

Time Complexity Quiz

Authored by Nathaniel Mensah

Other

University

Used 1+ times

Time Complexity Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?