Topics:
- tree traversals: pre-order, post-order, in-order, level-order
Resources:
- review Make School's tree traversal slides
- watch Make School's tree traversal video lecture
- play with VisuAlgo's interactive binary search tree visualization
Challenges:
- implement tree traversal instance methods on your
BinarySearchTreeclass using binary search tree starter code:items_in_order- return a list of all items in the tree found using in-order traversalitems_pre_order- return a list of all items in the tree found using pre-order traversalitems_post_order- return a list of all items in the tree found using post-order traversalitems_level_order- return a list of all items in the tree found using level-order traversal
- run
pytest test_binarysearchtree.pyto run the binary search tree unit tests and fix any failures - annotate all class instance methods with running time complexity analysis
Stretch Challenges:
- implement
TreeMapclass (map/dictionary abstract data type implemented with binary search tree data structure)
Project:
- trees and mazes tutorial on Make School's Online Academy