Chapter 121 - Binary Trees

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

When working with a binary tree, a node that has more than two children

is theoretically impossible in a correctly developed binary tree structure

A node that has no children is known as a

leaf node

Values are typically stored in a binary search tree so that a node's ________ child holds data that is less than the ________ data.

left, node's

In a non-linear linked list, a node can point to

more than one other node, plus the previous node in sequence

Select all that apply. Binary trees may be implemented as templates, but any data types used with them must support the ________ operator

>, <, ==

Deleting a node that has two children offers an opportunity to use

A function that returns a pointer to a pointer, a function parameter that is a pointer to a pointer, a double indirection (all of these)

In a binary tree, each node must have a minimum of two children (T/F)

False

Output will be the same if you use InOrder, PostOrder, or PreOrder traversals of the same binary tree (T/F)

False

The PostOrder method of traversing a binary tree involves processing the node's data, traversing the node's right subtree, and then traversing the node's left subtree (T/F)

False

The intBinaryTree class has a public member function, findNode, that returns true if a value is not found and false if the value is found (T/F)

False

To remove a node that has children, you must first remove the children (T/F)

False

In a binary tree, each node may point to ________ other node(s) (T/F)

No, one, or two nodes (Any of these)

Select all that apply. Which of the following are methods of traversing a binary tree?

PreOrder, InOrder, PostOrder

A subtree is an entire branch of a tree from one particular node down (T/F)

True

All nodes to the right of a node hold values greater than that node's value (T/F)

True

Binary trees are commonly used to organize key values that index database records (T/F)

True

Deleting a leaf node from a binary tree is not difficult but deleting a non-leaf node requires several steps (T/F)

True

The InOrder method of traversing a binary tree involves traversing the node's left subtree, processing the node's data, and then traversing the node's right subtree (T/F)

True

The PreOrder method of traversing a binary tree involves processing the node's data, traversing the node's left subtree, and then traversing the node's right subtree (T/F)

True

The binary tree structure is called a "tree" because it resembles an upside-down tree (T/F)

True

The height of a tree describes how many levels there are in the tree (T/F)

True

The width of a tree is the largest number of nodes in the same level (T/F)

True

All node pointers that do NOT point to other nodes are set to

a null pointer

When you dereference a pointer to a pointer, the result is

another pointer

When a binary tree is used to facilitate a search, it is referred to as a

binary search tree

When the root node points to two other nodes, the nodes are referred to as

child nodes, or children

The shape of a binary tree is

determined by the order in which values are inserted

Select all that apply. Which of the following operations can be performed on a binary search tree?

inserting, finding, deleting

The InOrder, PreOrder, and PostOrder traversals can be accomplished using

recursion

The first node in a binary tree list is called the

root node

In a binary tree class you usually have a pointer as a member that is set to the

root of the tree

The ________ in a binary tree is similar to the head pointer in a linked list.

root pointer

Binary trees can be divided into

subtrees

When an application begins by searching a binary tree, it starts at

the root node

A binary tree with a height of three has

three levels

A good reason to use the binary tree structure is

to expedite the process of searching large sets of information

The process of stepping through the nodes of a binary tree is known as

traversing

The head pointer, anchored at the top of a binary tree, may be called the

tree pointer

A binary tree can be created using a struct or class containing a data value and

two pointers, one for the left child and one for the right child


संबंधित स्टडी सेट्स

Factoring Polynomials: Double Grouping Assignment

View Set

Nclex-RN practice questions section 1: questions 1-23

View Set

BA 1500 - Chapter Overviews (Final)

View Set

Ch. 9-14 Anthropology (ANTH1200)

View Set

Patho Ch 33 best set: Diabetes Mellitus and the Metabolic Syndrome: Hormonal Control of Nutrient Metabolism and Storage

View Set

International Marketing Chapter 6

View Set

Ch. 4 Building Confidence to Speak

View Set

Home Owners Course Pre-test (Clearpoint)

View Set