What is the major advantage that a heap implementation of a priority queue has over a binary search tree implementation?
What will be an ideal response?
The major advantage of the heap implementation is that a heap is always balanced. This is not the case with a binary search tree, which degrades the binary search tree’s efficiency.
You might also like to view...
The following items are inserted into a binary search tree: 8, 4, 3, 2, 5, 9, 6, 1, 7 . Which item is placed at a root?
a. 1 b. 4 c. 8 d. 9 e. none of the above
____ is a network access method (or media access method) originated by the University of Hawaii.
A. FDDI B. AppleTalk C. Ethernet D. Token Ring
?A _____ negotiates with users who might have conflicting requirements or want changes that would require additional time or expense.
A. ?project manager B. ?project reporter C. ?software tester D. ?software developer
Scaling a random number as an integer value between 1 and N is accomplished using the expression ____.
A. 1 + (int)rand() / N B. 1 + (int)rand() % N C. (int)rand() / N D. (int)rand() % N