Data Structures Quiz

Data Structures Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Sudharsanan G

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of inserting an element into a max-heap?

O(1)

O(log n)

O(n)

O(n log n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a max-heap, the root node contains the:

Maximum element

Minimum element

Middle element

Random element

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true for a min-heap?

Parent node is always smaller than or equal to its children

Parent node is always greater than or equal to its children

Leaf nodes are greater than their parents

Elements are sorted in non-decreasing order

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of extracting the maximum element from a max-heap?

O(1)

O(log n)

O(n)

O(n log n)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following applications can be implemented using a heap?

Priority queue

Graph traversal

Binary search

Depth-first search

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of searching for an element in a hash table in the average case?

O(1)

O(log n)

O(n)

O(n log n)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following techniques is used to handle collisions in a hash table?

Linear probing

Binary search

Depth-first search

Breadth-first search

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?