Quiz 1 (Time and Space Complexity)

Quiz 1 (Time and Space Complexity)

University

15 Qs

quiz-placeholder

Similar activities

FINALS summative test in TRENDS

FINALS summative test in TRENDS

12th Grade - University

20 Qs

Quis SIG

Quis SIG

University

20 Qs

Animation Techniques Quiz

Animation Techniques Quiz

10th Grade - University

10 Qs

Quiz sobre Integração de Sistemas de Informação

Quiz sobre Integração de Sistemas de Informação

University

15 Qs

Web Application - PHP Repetition

Web Application - PHP Repetition

University

15 Qs

Aula07 - Matrizes

Aula07 - Matrizes

University

12 Qs

Mid Exam

Mid Exam

12th Grade - University

20 Qs

Data Security

Data Security

12th Grade - University

17 Qs

Quiz 1 (Time and Space Complexity)

Quiz 1 (Time and Space Complexity)

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Nishi Vanani

Used 14+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 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 CHOICE QUESTION

45 sec • 2 pts

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

O(n log n)

O(n!)

O(2^n)

None of the above

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²)

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?