Which of the following are min heaps?
Priority Queues and Heapsort

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Used 36+ times
FREE Resource
27 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
A
B
C
D
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
The 2 properties of a min heap are _____.
Tree must be full.
Tree must be complete.
Node values are always smaller than their children's values.
Node values are always greater than their children's values.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many swaps are made in the min heap when inserting the value 18?
0
1
2
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the efficiency of adding to a priority queue using the java.util.PriorityQueue class?
O(n)
O(n log n)
O(1)
O(log n)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What operation has efficiency O(1) using the java.util.PriorityQueue class?
Add
Remove
Peek
6.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following PriorityQueue<E> methods will throw an exception when used on an empty queue?
E remove()
E peek()
E element()
E poll()
7.
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
Create a free account and access millions of resources
Similar Resources on Quizizz
30 questions
Data Structures and Algorithm

Quiz
•
11th Grade - Professi...
22 questions
ULANGAN HARIAN KELAS X BAB 2

Quiz
•
10th Grade
32 questions
1.1 Y2

Quiz
•
11th Grade
25 questions
Algoritma dan Pemrograman - DSI

Quiz
•
11th Grade
25 questions
Data Structure - Trees

Quiz
•
12th Grade
27 questions
Graphs

Quiz
•
9th - 12th Grade
30 questions
KUIS KELAS XI

Quiz
•
9th Grade
25 questions
Data Structures - Queues

Quiz
•
12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade