4.2.5 - FoDS (Tree) Flashcards
1
Q
What is a tree
A
A connected, undirected graph with no cycles
2
Q
True or False:
A tree must have a root
A
False
3
Q
What is a cycle
A
A sequence of vertices and edges that can start and end on the same vertex
4
Q
What are 2 examples of trees
A
- Rooted trees
- Binary trees
- Binary search trees
5
Q
What is a rooted tree
A
A tree in which one vertex has been designated as a root, creating parent-child relationships
6
Q
What is a binary tree
A
A tree in which each node has at most 2 children
7
Q
What is a root
A
A node with no parents
8
Q
What is a leaf
A
A node with no children
9
Q
What is a branch
A
An edge connecting nodes
10
Q
What is the advantage of binary trees
A
Efficient sorting, searching and retrieval of data