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

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

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 numberLeaves(Node tree)that returns the number of leaves in the binary tree whose root is tree.

(Essay)
4.9/5
(29)

In a binary tree,

(Multiple Choice)
4.9/5
(38)

Adding all items from a list to a certain data structure and then removing them one at a time yields a sorted version of the list.The data structure is a

(Multiple Choice)
4.8/5
(40)

The order condition that characterizes a heap states that

(Multiple Choice)
4.9/5
(42)

A priority queue is

(Multiple Choice)
4.9/5
(33)
Showing 41 - 45 of 45
close modal

Filters

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