Search Header Logo

Quicksort. Hash Tables, and Binary Search Trees

Authored by B G

Computers

University

Used 35+ times

Quicksort. Hash Tables, and Binary Search Trees
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Media Image

What is the time complexity of the following code? (Click on image to view full screen)

O(nlogn)

O(n)

O(1)

Answer explanation

If one unit of time is used to represent run time, the above program can be run in n times the amount of time. As a result, the program scales linearly with the size of the input and has an order of O(n).

2.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Media Image

What is the Time Complexity of the attached code?(Click on image to view full screen)

O(n)

O(1)

O(log n)

3.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Media Image

What is the time complexity of the following code?(Click on image to view full screen)

O(1)

O(n log n)

O(n)

Answer explanation

This is a nested loop, so it has a cumulative time complexity

4.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Media Image

What is the time complexity of the code?(Click on image to view full screen)

O(1)

O(n)

O(n log n)

O(2)

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the search complexity in direct addressing of hash tables?

O(n)

O(log n)

O(n log n)

O(1)

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the average run time for quick sort algorithm?

O(n)

O(nlog n)

O(log n)

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

How many sub arrays does the quick sort algorithm divide the entire array into?

One

Two

Four

Three

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?