HEAP

HEAP

Professional Development

10 Qs

quiz-placeholder

Similar activities

QAQC Quiz

QAQC Quiz

Professional Development

10 Qs

Cycle 4: Session 8 Review.

Cycle 4: Session 8 Review.

Professional Development

12 Qs

M365 Security Pillar 1 (Identity & Access Management)

M365 Security Pillar 1 (Identity & Access Management)

Professional Development

10 Qs

Cloud computing

Cloud computing

Professional Development

10 Qs

aXQtMjktMTEtMjAyMg==

aXQtMjktMTEtMjAyMg==

Professional Development

10 Qs

CHFI-Post-Assessment

CHFI-Post-Assessment

Professional Development

10 Qs

Family Quizz

Family Quizz

5th Grade - Professional Development

15 Qs

Initial Assessment - Cybersecurity Awareness

Initial Assessment - Cybersecurity Awareness

9th Grade - Professional Development

10 Qs

HEAP

HEAP

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

PVS SAIRAM

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which of the following are min heaps?

A

B

C

D

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How many swaps are made in the min heap when inserting the value 18?

0

1

2

3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What operation has efficiency O(1) using the java.util.PriorityQueue class?


Peek()

Pop()

Poll()

Remove()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following PriorityQueue<E> methods will throw an exception when used on an empty queue?

remove()

poll()

pop()

peek()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When removing the root from a min heap, what is the first step?

Replace the root with the next smallest value from the tree

Replace the root with the leaf furthest to the left on the bottom level of the tree

Replace the root with the leaf furthest to the right on the bottom level of the tree

Replace the root with the smallest of its children

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The formula for finding the right child of a node in a heap stored in an array is ________ . (The root is at index 0)

( 2 * Parent ) + 2

( 2 * Parent ) + 1

( 2 * Parent ) + 3

( 2 * Parent )

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the process of 'heapifying' in Heap Sort?


Arranging elements in a heap data structure

Sorting elements in reverse order


Removing elements from the heap

Randomly shuffling the elements

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?