Exam 22: Binary Trees, Avl Trees, and Priority Queues

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

To add a new element X to a heap:

Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
Verified

C

The heap sort method has a worst case complexity function that is in

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

D

The depth of a binary tree

Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
Verified

A

A binary tree with depth d is complete if

(Multiple Choice)
5.0/5
(41)

A sorting algorithm based on a priority queue is

(Multiple Choice)
4.8/5
(27)

The length of the longest path from the root of a binary tree to a leaf is called

(Multiple Choice)
4.9/5
(36)

Consider the operation of deleting the root of a binary search tree.If the root has one child,then

(Multiple Choice)
4.8/5
(34)

Assuming a Node class class Node { int element; Node left,right; Node(int el,Node left,Node right){ element = el; this.left = left; this.right = right; } } Write a method int size(Node tree)that returns the number of nodes in the binary tree whose root is tree.

(Essay)
4.9/5
(34)

A complete binary tree with N nodes may be stored in an array A of length N by storing the root at A[0],and then storing in successive array locations the nodes of the tree in increasing order of the level of nodes.If nodes in the same level are stored in left to right order,then the left child of the node stored at A[k] will be stored at

(Multiple Choice)
4.8/5
(43)

Consider the operation of deleting the root of a binary search tree.If the root is a leaf,then

(Multiple Choice)
4.9/5
(38)

A binary tree traversal method that recursively traverses the left subtree,then visits the root,then traverses the right subtree is called

(Multiple Choice)
4.8/5
(34)

A binary tree with no root

(Multiple Choice)
4.8/5
(35)

Postorder traversal of a binary tree

(Multiple Choice)
4.8/5
(31)

Let X be a node in a binary tree.Any node on the path from X to the root is called

(Multiple Choice)
4.7/5
(45)

The level of a node X in a binary tree

(Multiple Choice)
4.8/5
(39)

A complete binary tree with N nodes may be stored in an array A of length N by storing the root at A[0],and then storing in successive array locations the nodes of the tree in increasing order of the level of nodes.If nodes in the same level are stored in left to right order,then the parent of the node stored at A[k] will be stored at

(Multiple Choice)
4.8/5
(42)

An empty binary tree has height

(Multiple Choice)
4.9/5
(34)

To find the minimum element stored in a heap

(Multiple Choice)
4.9/5
(39)

A complete binary tree with N nodes may be stored in an array A of length N by storing the root at A[0],and then storing in successive array locations the nodes of the tree in increasing order of the level of nodes.If nodes in the same level are stored in left to right order,then the right child of the node stored at A[k] will be stored at

(Multiple Choice)
4.9/5
(34)

The successor of a node in a binary tree is called its

(Multiple Choice)
4.9/5
(36)
Showing 1 - 20 of 45
close modal

Filters

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