When building a heap using build_heap(list), which of the following is true?

80-100

Quiz
•
Information Technology (IT)
•
University
•
Easy
Ілияс Тілепалды
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
The list is processed from the last parent backward
The resulting tree is a max-heap
The resulting tree is a min-heap
The resulting structure is not a complete binary tree
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following keys would appear in the left subtree after inserting [68, 88, 61, 89, 94, 50, 4, 76, 66, 82] into a BST?
61
50
76
94
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which properties apply to a binary search tree created from randomly generated integers?
The tree will always be complete
The shape of the tree depends on insertion order
Values in the left subtree are always less than root
It is always balanced
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
What structure results from inserting [1, 2, 3, ..., 10] into a binary heap (min-heap) one at a time?
The heap has the smallest number at the root
The structure is a max-heap
The tree is not complete
Each parent is less than or equal to its children
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
What structure results from inserting [10, 9, 8, ..., 1] into a binary heap (min-heap) one at a time?
The last number becomes the root
The tree is skewed
The structure remains a complete binary tree
Each parent is greater than its children
6.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Why must we check for None before calling a method like preorder() on a tree node, but not when using a function-based traversal?
Methods require a real object to invoke
Functions can handle None as an argument
Methods create their own stack
Preorder functions are always recursive
7.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following keywords are used in Python?
else
elif
if
endif
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Kelas 7 - Halaman 12 (UH Bab 1)

Quiz
•
7th Grade - University
15 questions
Punteros y Memoria Dinamica

Quiz
•
University
20 questions
2F-3 | Python Quiz | 14/11/2024

Quiz
•
University
15 questions
Python Challenge

Quiz
•
University
15 questions
แข่งขันcodingม.ต้น

Quiz
•
12th Grade - University
17 questions
Machine Learning Quiz

Quiz
•
University
15 questions
Join by Madi

Quiz
•
University
15 questions
uji coba Strategi Algoritma dan Pemrograman

Quiz
•
11th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade