Exam 19: Binary Trees

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

The algorithm below describes the nonrecursive ____________________ traversal of a binary tree. 1.current = root; 2.while (current is not NULL or stack is nonempty) if (current is not NULL) { push current onto stack; current = current->lLink; } else { current = stack.top(); pop stack; visit current; //visit the node current = current->rLink;//move to right child }

(Short Answer)
4.9/5
(44)

The listing of the nodes produced by the inorder traversal of a binary tree is called the ____________________.

(Short Answer)
4.8/5
(46)

Let T be a binary search tree with n nodes,in which n > 0.The average number of nodes visited in a search of T is approximately O(____________________).

(Short Answer)
4.8/5
(33)

The ____ of a node in a binary tree is the number of branches on the path from the root to the node.

(Multiple Choice)
4.9/5
(34)

The key of the right child below the root node of a search binary tree is 40.The value in the root node could be ____.

(Multiple Choice)
4.7/5
(43)

A node in a binary tree is called a(n)____ if it has no left and right children.

(Multiple Choice)
4.9/5
(39)

The listing of the nodes produced by the postorder traversal of a binary tree is called the ____.

(Multiple Choice)
4.9/5
(41)

Consider that A is a binary tree,C and D are the subtrees of A.Which of the following statements is always true?

(Multiple Choice)
4.8/5
(40)

The listing of the nodes produced by the preorder traversal of a binary tree is called the ____________________.

(Short Answer)
4.8/5
(36)

Let T be a binary search tree with n nodes,in which n > 0.The number of key comparisons is approximately O(____________________).

(Short Answer)
4.9/5
(29)
Showing 41 - 50 of 50
close modal

Filters

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