CIS22C CH 23 Trees

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

How many nodes are in a full binary tree of height 5? a.31 b.32 c.33 d.5

31

The nodes in a binary search tree contain _____ objects. a.Comparable b.Sorted c.key-value pair d.binary

Comparable

A preorder traversal of a binary tree is an example of a depth-first traversal.

True

A subtree of a tree is a subtree of the tree'sroot.

True

All leaves in a full binary tree are on the same level.

True

A node in a binary tree whose subtrees differ in height by no more than 1 is known as a(n) _____ node. a.balanced b.orphan c.leaf d.terminating

balanced

A tree in which each node may have no more than nchildren is called a(n) _____ tree. a.n-ary b.binary c.general d.branching

n-ary

A _____ is a set of nodes connected by edges that indicate the relationships among the nodes. a.tree b.bag c.hierarchy d.linked list

tree

What is the height of a complete tree that contains 11 nodes? a.4 b.3 c.5 d.11

4

A level-order traversal of a binary tree is an example of a depth-first traversal.

False

Completely balance binary trees are not necessarily full.

False

Every general tree is an n-ary tree.

False

The path between a tree's root and any other node is not unique.

False

All nodes in a balanced binary tree are balanced.

True

An inorder traversal is not well defined for a general tree.

True

Every node in a binary search tree is the root of a binary search tree.

True

In a tree, nodes are arranged in levels that indicate the nodes' hierarchy.

True

In a tree, the root is the only node that has no parent.

True

The height of a tree equals the number of nodes along the longest path between the root and a leaf.

True

A subtree of a node is a tree rooted at a.a child of that node b.the root of the tree c.a sibling of that node d.the node itself

a child of that node

An example of a data organization that is hierarchical is a(n) a.family tree b.university administration structure c.file directories d.all of the above

all of the above

A tree in which each node may have at most two children is called a(n) _____ tree. a.binary b.general c.bi-lingual d.n-ary

binary

A binary tree has at most two children called a.the left child b.the right child c.both a & b Qd.none of the above

both a & b

A node that has children is called a(n) _____. a.nonleaf b.interior node c.both a & b d.none of the above

both a & b

The nodes at each successive level of a tree are called _____. a.children b.parents c.roots d.keys

children

When a binary tree is full to its next-to-last level and its leaves on the last level are filled from left to right, the tree is said to be a.complete b.organized c.populated d.ordered

complete

A tree is aset of nodes connected by _____ that indicate the relationships among the nodes .a.edges b.lists c.bags d.siblings

edges

When a binary tree of height h has all of its leaves at level h and every nonleaf has exactly two children, the tree is said to be a.full b.populated c.organized d.congested

full

A tree in which each node may have an arbitrary number of children is called a(n) _____ tree. a.general b.multi-faceted c.branching d.super

general

The number of levels in a tree is called the a.height b.node count c.branch level d.size

height

A family tree is typically organized into a(n) _____ order. a.hierarchical b.linear c.circular d.group

hierarchical

When you classify data into groups and subgroups, you are using a(n) _____ order. a.hierarchical b.linear c.circular d.group

hierarchical

In a _____ traversal of a binary tree, you visit the root of a binary tree between visiting the nodes of the root's subtrees. a.inorder b.preorder c.postorder d.level order

inorder

A node with no children is called a(n) _____. a.leaf b.parent c.both a & b d.none of the above

leaf

In a _____ traversal of a binary tree, you begin at the root and visit nodes one level at a time. a.level order b.inorde c.flat order d.straight order

level order

The height of a full tree that has nnodes is a.log2(n+1) b.log2(n-1) c.n + 1 d.n

log2(n+1)

he height of a complete tree that has nnodes is a.log2(n+1) b.log2(n-1) c.n + 1 d.n

log2(n+1)

A _____ is a complete binary tree such that each node in the tree contains a Comparable object that is greater than or equal to the objects in the node's descendants. a.maxheap b.minheap c.binheap d.fullheap

maxheap

A tree is a set of _____ connected by edges that indicate the relationships among the nodes. a.nodes b.links c.lists d.bags

nodes

A node that has children is a(n) _____. a.parent b.sibling c.key d.edge

parent

In a _____ traversal of a binary tree, you visit the root of a binary tree after you visit the root's subtrees. a.postorder b.preorder c.inorder d.level order

postorder

In a _____ traversal of a binary tree, you visit the root node before you visit the root's subtrees. a.preorder b.postorder c.inorder d.level order

preorder

At the top level of a tree is a single node called the _____. a.root b.top c.pinnacle d.front

root

The _____ node is the only node that has no parent. a.root b.child c.binary d.n-ary

root

Nodes that are children of the same parent node are called _____. a.siblings b.descendants c.ancestors d.roots

siblings

Any node and its descendants form a _____ of the original tree. a.subtree b.nested c.super tree d.separate tree

subtree


Set pelajaran terkait

Chapter 17: The Origin of Species

View Set

RHM 175 Ch 2/ Travel and Tourism Industry

View Set

FIT1050 - web fundamentals WEEK 1 - 5

View Set