Data Structures Quiz

Data Structures Quiz

Assessment

Quiz

Computers

12th Grade

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Computers