- like a root
- top element represents base of tree
- tips of tree are called leaves
- based on compareTo method
- smaller things go on the left, larger on the right
- NOT when there are a lot of insertion and deletions; hashmap would be better
- very application specific
- Tree root is changed for optimization
- logN
Weighted Graph for finding the shortest route
- used to as a good way to reuse code
- not always appicable
- similar to tree sorting
- breaking down until there is just two elements
- On final exam
- essential parts:
- Base Case: problem can be solved with one step
- Recursive Case: gets problem to point where it can be solved with one step
- can be used to sort arrays
- know when to stop/when the problem is solved
- how to break it apart
- how to bring it together
- hogs memory
- things get stuck at the bottom of the stack
- Java Collections Framework