CSCI 3110 Exam Review Guide: Trees

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

A node that has no children is known as a ________.

leaf node

In a binary tree, each node may point to ________ other nodes.

no, one, two

Consider the binary tree in the image. Which sequence created this tree?

14, 23, 6, 21, 24

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

<, >, ==

Consider the starting AVL tree at the top of the image. Choose the operation(s) performed on the tree after node 12 is inserted.

Double rotation: B then D

Output will be the same if you use InOrder, PostOrder, or PreOrder traversals of the same binary tree.

False

True/False: In a binary tree, each node must have a minimum of two children.

False

True/False: A subtree is an entire branch of a tree, from one particular node down.

True

True/False: Deleting a leaf node from a binary tree is not difficult. Deleting a non-leaf node requires several steps.

True

True/False: In a binary search tree all nodes to the right of a node hold values greater than the node's value.

True

True/False: 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.

True

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

Methods of traversing a binary tree are:

inorder, preorder, and postorder traversal

In a tree implemented with dynamically allocated nodes, the inorder, preorder, and postorder traversals can be accomplished using ________.

recursion

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

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


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

Sololearn 4.1 Python for Beginners "Mathematical Operations

View Set

AOA Foundations for Living Unit 3

View Set

Chapter 5 Human Development, quiz 5 6

View Set

Slide Studies (Cognitive Neuroscience)

View Set

inter mgnt 4.0 (meaning and dimensions of culture)

View Set

Venice italy - 8th wonders of the world

View Set

Chapter 5: PrepU - Infections sexually

View Set