Podcast
Questions and Answers
What condition must a tree satisfy to be considered acyclic?
What condition must a tree satisfy to be considered acyclic?
- Having n-1 edges (correct)
- Having no children
- Having two children
- Being connected
In a binary tree, how many children can each vertex have?
In a binary tree, how many children can each vertex have?
- 0 or 1
- 1 or 2
- 0, 1, or 2 (correct)
- Any number of children
What is the purpose of the 'Inorder' algorithm in binary trees?
What is the purpose of the 'Inorder' algorithm in binary trees?
- To print the nodes in post-order
- To count nodes
- To print the nodes in sorted order (correct)
- To print the nodes in pre-order
Which traversal algorithm would be most useful to find the height of a binary tree?
Which traversal algorithm would be most useful to find the height of a binary tree?
How does a binary tree differ from a general tree?
How does a binary tree differ from a general tree?
A tree with n vertices can have different number of edges and still be considered a tree.
A tree with n vertices can have different number of edges and still be considered a tree.
In a binary tree, each vertex can have up to three children.
In a binary tree, each vertex can have up to three children.
A connected and acyclic tree will always have n-1 edges.
A connected and acyclic tree will always have n-1 edges.
A binary tree is always a rooted tree.
A binary tree is always a rooted tree.
The preorder traversal algorithm guarantees that the nodes will be visited in ascending order.
The preorder traversal algorithm guarantees that the nodes will be visited in ascending order.
Flashcards are hidden until you start studying