Write a function called breadth first
- Arguments: tree
- Return: list of all values in the tree, in the order they were encountered
- NOTE: Traverse the input tree using a Breadth-first approach
- Write out problem statement
- drew it out first because I didn't get it
- looked at binary tree code for help
- create breadth first function
- use queue, pop and append to list
- return list
- The Big O time is O(n) where n is number of nodes in tree and iterates over all nodes once. Space: O(n) because it stores all nodes using in order traversal
