Quiz 1 (Time and Space Complexity)

Quiz 1 (Time and Space Complexity)

University

8 Qs

quiz-placeholder

Similar activities

advanced data structures algorithm& anlaysis

advanced data structures algorithm& anlaysis

University

8 Qs

insertion sort

insertion sort

University

6 Qs

AverageRound

AverageRound

University

10 Qs

Data Structures Quiz

Data Structures Quiz

University

3 Qs

Multiple-Choice Quiz: Algorithms Lab 2

Multiple-Choice Quiz: Algorithms Lab 2

University

10 Qs

Quiz 22-08-25

Quiz 22-08-25

University

10 Qs

Quiz - Fundamentos JS

Quiz - Fundamentos JS

University

10 Qs

2.2 Method of Data Transmission

2.2 Method of Data Transmission

University

13 Qs

Quiz 1 (Time and Space Complexity)

Quiz 1 (Time and Space Complexity)

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Nishi Vanani

Used 2+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

What is the time complexity of the following code?

O(n)

O(n²)

O(n log n)

O(log n)

2.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

What is the space complexity of a recursive function that uses a stack for its operations?

O(n²)

O(n)

O(1)

O(log n)

3.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

In Big O notation, which of the following represents a linear relationship?

O(1)

O(n²)

O(n)

O(n log n)

4.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

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

O(1)

O(log n)

O(n)

O(n log n)

5.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

In Big O notation, which of the following represents a logarithmic relationship?

O(n²)

O(n)

O(n log n)

O(log n)

6.

MULTIPLE SELECT QUESTION

45 sec • 2 pts

Which of the following functions have a time complexity better than O(n²)?

O(n log n)

O(n^1.5)

O(2n)

O(n!)

7.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

What is the space complexity of the following code?

O(1)

O(log n)

O(n)

O(n²)

8.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

What is the space complexity of an iterative algorithm that uses a constant amount of space?

O(n²)

O(log n)

O(n)

O(1)