Exam 11: Binary Search Trees

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

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)

Heap sort is O(________).

(Multiple Choice)
4.8/5
(43)

Heap sort is O(______).

(Short Answer)
4.7/5
(38)

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)

What is the difference between a minheap and a maxheap?

(Essay)
4.9/5
(43)

What does it mean for a heap to be complete?

(Essay)
4.8/5
(38)

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)

What is the time complexity of the removeMin operation?

(Essay)
4.8/5
(30)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)