Heaps Quiz

Heaps Quiz

University

15 Qs

quiz-placeholder

Similar activities

BCSC0006 - Quiz 4 - Linked List & Stacks

BCSC0006 - Quiz 4 - Linked List & Stacks

University

10 Qs

Hadoop

Hadoop

University

15 Qs

Big Data & Hadoop

Big Data & Hadoop

University

20 Qs

Quiz despre B+ Tree

Quiz despre B+ Tree

University

10 Qs

linux commands

linux commands

University

20 Qs

Fundamentals of data Structures & Linked list

Fundamentals of data Structures & Linked list

University

20 Qs

PSD 09_09_21

PSD 09_09_21

University

20 Qs

Object Oriented Programming

Object Oriented Programming

University

13 Qs

Heaps Quiz

Heaps Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Jordan Burgess

FREE Resource

15 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

What are the two storage rules that make heaps special?

The tree is a complete binary tree

Every level except the deepest must have as many nodes as possible

A parent's item is never less than the item of any of its children

The item contained in a node is greater than or equal to the items of the node's children

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How can a heap be implemented using an array?

By storing the root node in position 1 and locating the children randomly

By storing the root node in position 1 and locating the children mathematically

By storing the root node in position 0 and locating the children mathematically

By storing the root node in position 0 and locating the children randomly

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a priority queue?

A queue in which items are stored based on their insertion order

A queue in which items are stored based on their alphabetical order

A queue in which each item has a priority assigned to it

A queue in which items are stored based on their numerical order

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What are the two key operations for a heap?

Adding a new entry and removing the entry with the highest priority

Adding a new entry and removing the entry with the middle priority

Adding a new entry and removing the entry with the lowest priority

Adding a new entry and removing any random entry

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the first step in adding a new entry to a heap?

Swap the new entry with the highest priority child node

Swap the new entry with the right child node

Swap the new entry with the left child node

Swap the new entry with the parent node

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the first step in removing an entry from a heap?

Return the entry stored in the right child node

Return the entry stored in the highest priority child node

Return the entry stored in the root node

Return the entry stored in the left child node

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the process called when reheapifying a heap upward?

Reheapification upward

Reheapification downward

Heapification upward

Heapification downward

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?