- Trees Ch.24 Test Bank Answers 5th Edition - Data Structures with Java 5e Complete Test Bank by Frank M. Carrano. DOCX document preview.
Chapter 24 - Trees
True/False (13)
- In a tree, nodes are arranged in levels that indicate the nodes’ hierarchy.
- In a tree, the root is the only node that has no parent.
- Every general tree is an n-ary tree.
- A subtree of a tree is a subtree of the tree’s root.
- The path between a tree’s root and any other node is not unique.
- The height of a tree equals the number of nodes along the longest path between the root and a leaf.
- All leaves in a full binary tree are on the same level.
- Completely balance binary trees are not necessarily full.
- All nodes in a balanced binary tree are balanced.
- A level-order traversal of a binary tree is an example of a depth-first traversal.
- A preorder traversal of a binary tree is an example of a depth-first traversal.
- An inorder traversal is not well defined for a general tree.
- Every node in a binary search tree is the root of a binary search tree.
Short Answer (19)
- How many nodes are in a full binary tree of height 8?
- What is the height of a complete tree that contains 18 nodes?
- List the steps of a preorder traversal of a binary tree.
b) visit all the nodes in the root’s left subtree
c) visit all the nodes in the root’s right subtree
- List the steps of a postorder traversal of a binary tree.
b) visit all the nodes in the root’s right subtree
c) visit the root
- List the steps of an inorder traversal of a binary tree.
b) visit the root
c) visit all the nodes in the root’s right subtree
- Given the following binary tree, list the leaf nodes.
- Given the following binary tree, list the nonleaf nodes.
- Give the preorder traversal of the following binary tree.
- Give the inorder traversal of the following binary tree.
- Give the postorder traversal of the following binary tree.
- Give the level order traversal of the following binary tree.
- Build the binary expression tree for the following input.
(7 + (2 – 1)) 8
- What is the minimum height possible for a binary tree with 11 nodes? Construct an example tree.
- What is the maximum height possible for a binary tree with 7 nodes? Construct an example tree.
- Given the following general tree, list the leaf nodes.
- Given the following general tree, what are the siblings of node C?
- Given the following general tree, what are the descendants of node C?
- Given the following general tree, what are the ancestors of node M?
- Given the following general tree, which nodes are parents?
Multiple Choice (33) WARNING: CORRECT ANSWERS ARE IN THE SAME POSITION AND TAGGED WITH . YOU SHOULD RANDOMIZE THE LOCATION OF THE CORRECT ANSWERS IN YOUR EXAM.
- When you classify data into groups and subgroups, you are using a(n) _____ order.
- hierarchical
- linear
- circular
- group
- A family tree is typically organized into a(n) _____ order.
- hierarchical
- linear
- circular
- group
- An example of a data organization that is hierarchical is a(n)
- family tree
- university administration structure
- file directories
- all of the above
- A _____ is a set of nodes connected by edges that indicate the relationships among the nodes.
- tree
- bag
- hierarchy
- linked list
- A tree is a set of _____ connected by edges that indicate the relationships among the nodes.
- nodes
- links
- lists
- bags
- A tree is a set of nodes connected by _____ that indicate the relationships among the nodes.
- edges
- lists
- bags
- siblings
- At the top level of a tree is a single node called the _____.
- root
- top
- pinnacle
- front
- The nodes at each successive level of a tree are called _____.
- children
- parents
- roots
- keys
- A node that has children is a(n) _____.
- parent
- sibling
- key
- edge
- Nodes that are children of the same parent node are called _____.
- siblings
- descendants
- ancestors
- roots
- A node with no children is called a(n) _____.
- leaf
- parent
- both a & b
- none of the above
- A node that has children is called a(n) _____.
- nonleaf
- interior node
- both a & b
- none of the above
- A tree in which each node may have an arbitrary number of children is called a(n) _____ tree.
- general
- multi-faceted
- branching
- super
- A tree in which each node may have at most two children is called a(n) _____ tree.
- binary
- general
- bi-lingual
- n-ary
- A tree in which each node may have no more than n children is called a(n) _____ tree.
- n-ary
- binary
- general
- branching
- The _____ node is the only node that has no parent.
- root
- child
- binary
- n-ary
- Any node and its descendants form a _____ of the original tree.
- subtree
- nested
- super tree
- separate tree
- A subtree of a node is a tree rooted at
- a child of that node
- the root of the tree
- a sibling of that node
- the node itself
- The number of levels in a tree is called the
- height
- node count
- branch level
- size
- A binary tree has at most two children called
- the left child
- the right child
- both a & b
- none of the above
- 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
- full
- populated
- organized
- congested
- 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
- complete
- organized
- populated
- ordered
- A node in a binary tree whose subtrees differ in height by no more than 1 is known as a(n) _____ node.
- balanced
- orphan
- leaf
- terminating
- The height of a full tree that has n nodes is
- log2(n+1)
- log2(n-1)
- n + 1
- n
- The height of a complete tree that has n nodes is
- log2(n+1)
- log2(n-1)
- n + 1
- n
- How many nodes are in a full binary tree of height 5?
- 31
- 32
- 33
- 5
- What is the height of a complete tree that contains 11 nodes?
- 4
- 3
- 5
- 11
- In a(n) _____ traversal of a binary tree, you visit the root node before you visit the root’s subtrees.
- preorder
- postorder
- inorder
- level order
- In a(n) _____ traversal of a binary tree, you visit the root of a binary tree between visiting the nodes of the root’s subtrees.
- inorder
- preorder
- postorder
- level order
- In a(n) _____ traversal of a binary tree, you visit the root of a binary tree after you visit the root’s subtrees.
- postorder
- preorder
- inorder
- level order
- In a(n) _____ traversal of a binary tree, you begin at the root and visit nodes one level at a time.
- level order
- inorder
- flat order
- straight order
- The nodes in a binary search tree contain _____ objects.
- Comparable
- Sorted
- key-value pair
- binary
- 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.
- maxheap
- minheap
- binheap
- fullheap
Document Information
Connected Book
Data Structures with Java 5e Complete Test Bank
By Frank M. Carrano
Test Bank
General
View Product →
Explore recommendations drawn directly from what you're reading
Quick Navigation
Benefits
Immediately available after payment
Answers are available after payment
ZIP file includes all related files
Files are in Word format (DOCX)
Check the description to see the contents of each ZIP file
We do not share your information with any third party