Trees Flashcards
What is a tree?
A data structure that consist of nodes in a parent-child relationship. This means node can reference multiple nodes.
What is the difference between trees and linked list.
Linked list are linear where trees are not.
What are the rules for trees?
1 - A node can not a reference another node that is not a child.
2 - A child node cannot point to its parent.
3 - There must be a root node.
What is a leaf?
A node with no children.
What is a edge?
A connection between one node another.
What is a sibling?
A group of nodes with the same parent.
What are the use cases?
1 - HTML DOM
2 - Network Routing
3 - AI
4 - Operating System Files
What are the different types of trees?
There is binary trees, ternary trees, and N-ary trees.