Exam 11: Binary Search Trees
Exam 1: Introduction36 Questions
Exam 2: Analysis of Algorithms31 Questions
Exam 3: Introduction to Collections - Stacks49 Questions
Exam 4: Linked Structures - Stacks51 Questions
Exam 5: Queues28 Questions
Exam 6: Lists42 Questions
Exam 7: Iterators32 Questions
Exam 8: Recursion57 Questions
Exam 9: Searching and Sorting54 Questions
Exam 10: Trees47 Questions
Exam 11: Binary Search Trees50 Questions
Exam 12: Heaps and Priority Queues29 Questions
Exam 13: Sets and Maps47 Questions
Exam 14: Multi-Way Search Trees47 Questions
Exam 15: Graphs29 Questions
Exam 16: UML16 Questions
Exam 17: Object-Oriented Design54 Questions
Select questions type
Since a heap is a complete tree, there is only one correct location for the insertion of a new node, and that is either the next open position from the left at level h or the first position on the left at level h+1 if level h is full.
(Multiple Choice)
4.8/5
(37)
Typically, in heap implementations, we keep track of the position of the last node or, more precisely, the last leaf in the tree.
(True/False)
4.9/5
(43)
A minheap stores its largest element at the root of the binary tree, and both children of the root of a minheap are also minheaps.
(True/False)
4.9/5
(45)
The addElement operation for the linked implementation must determine the parent of the next node to be inserted. Why?
(Essay)
4.9/5
(34)
The addElement method adds a given ______ element to the appropriate location in the heap, maintaining both the completeness property and the ordering property of the heap.
(Short Answer)
4.9/5
(37)
Though not a queue at all, a ______ provides an efficient implementation of a priority queue.
(Short Answer)
4.8/5
(27)
A minheap stores its smallest element at the ________ of the binary tree.
(Multiple Choice)
4.9/5
(35)
Though not a queue at all, a minheap provides an efficient implementation of a _____________.
(Multiple Choice)
4.8/5
(37)
The removeMin operation for both the linked and array implementations is O(log n).
(Multiple Choice)
4.9/5
(36)
The addElement operation for both the linked and array implementations is O(__________).
(Multiple Choice)
4.9/5
(37)
A ______ stores its smallest element at the root of the binary tree.
(Short Answer)
4.7/5
(42)
To maintain the ______ of the tree, there is only one valid element to replace the root, and that is the element stored in the last leaf in the tree.
(Short Answer)
4.9/5
(36)
Typically, in ______ implementations, we keep track of the position of the last node or, more precisely, the last leaf in the tree.
(Short Answer)
4.9/5
(44)
Why does the addElement operation for the array implementation not have to determine the parent of the next node to be inserted?
(Essay)
4.8/5
(38)
The addElement method adds a given Comparable element to the appropriate location in the heap, maintaining both the completeness property and the ordering property of the heap.
(True/False)
4.8/5
(38)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)