Tree
Last updated
Was this helpful?
Last updated
Was this helpful?
A tree is a datastructure representing nodes connected by edges
Each node can have a maximum of 2 children
The path is the sequence of one node to the other
A leaf is a node without children
Insertion
Search
Level order starts at the root and goes from top to bottom from left to right
first root node, then left subtree, then right subtree
The output will produce sorted key values in ascending order
First left subtree, then root, then right subtree
First left subtree, then right subtree, then root