trees Flashcards
What is a tree?
A data structure which has a root node, and child nodes connected with branche
What is a node?
A node is any item in a tree
What is an edge?
An edge is the connection between two nodes
What is the root node?
The node which doesn’t have any incoming nodes, at the top of the tree
What is a child?
Any node which has an incoming edge
What is a parent?
Any node which has outcoming edges
What is a subtree?
A section of the tree which consists of a parent and all the children of that parent
What is a leaf?
A leaf is a node which has no children
What is a binary tree?
A type of tree in which each node has a maximum of two children
What is the purpose of a binary tree?
A binary tree is used to search for values quickly.