CHAPTER 16 TRUE/FALSE

Ace your homework & exams now with Quizwiz!

A balanced binary search tree decreases the efficiency of the ADT operations.

FALSE

A reference parameter in a protected method does not allow the client code to modify the parameter.

FALSE

According to the text, an array-based implementation of a binary tree is much less attractive when the tree is complete.

FALSE

In an array-based implementation of a binary tree, the data member free is the index of the index of the first node in the free list. Therefore the next available node will always be at index free + 1.

FALSE

The add method of BinaryNodeTree concatenates two trees.

FALSE

The class BinaryNodeTree had only the default constructor.

FALSE

The postorder traversal of a binary search tree will visit the tree's data items in sorted order.

FALSE

The traversals of a binary search tree differ from the traversals of a binary tree.

FALSE

A binary search tree is a binary tree.

TRUE

A full tree with exactly n = 2h − 1 nodes for some height h has the exact middle of the data items in its root.

TRUE

According to the text, it is natural to make each node an object.

TRUE

For class BinaryNodeTree, the copy constructor and the destructor implicitly use traversal.

TRUE

If you use an array-based implementation of a complete binary tree, you must be sure that the tree remains complete as a result of additions or removals.

TRUE

In the class BinaryNodeTree, the methods that use the parameter visit can modify the tree's data, but not its structure.

TRUE

In the class BinaryNodeTree, the public traversal methods each call a protected method that performs the actual recursion.

TRUE

Making methods protected enables a derived class to use them directly

TRUE

The add method of BinaryNodeTree does not indicate where that new data should be in the tree.

TRUE

This is a tree of minimum height that is not complete.

TRUE

When a node is removed from a tree and returned to the free list, it could be anywhere in the array.

TRUE

or class BinaryNodeTree, the copy constructor and the destructor each call a recursive method.

TRUE


Related study sets

NUR 224 Possible Test Questions Final Part 3

View Set

Interior Design B- Unit 3: Tools of the Trade

View Set

Property & Casualty Basics (Ohio)

View Set