A) Internally, a bin heap is typically implemented as a BST that has the additio
ID: 3910370 • Letter: A
Question
A) Internally, a bin heap is typically implemented as a BST that has the additional ordering property that the minimum value is at the root (or the maximum value is at the root, if we chose to make the bin heap to be a max heap).
True
False
----------------------------------------------------------------------------------------------------
B) In DIJKSTRA (match the phrases):
1. might end up taking more time because inserting into this data structure is not a constant-time operation.
2. might end up taking more time due to multiple copies of the same vertex being pushed and popped unnecessarily.
a) using a quenue for partially processed vertices
b) using a set for partially processed vertices
------------------------------------------------------------------------------------------------
You are given an array of N elements in sorted order. You can create a balanced Binary Search Tree from this array in
(Pick only the tightest bound)
O(1) time
O(N) timeExplanation / Answer
B) In DIJKSTRA (match the phrases):?
b) using a set for partially processed vertices?
Option a) O(N) time
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.