data-structures-and-algorithms
401 data structures and algorithms code challenges
Project maintained by alsosteve
Hosted on GitHub Pages — Theme by mattgraham
Tree Intersection
Feature Tasks
Find common values in 2 binary trees.
Method:
Write a function called tree_intersection
that takes two binary trees as parameters.
Using your Hashmap implementation as a part of your algorithm, return a set of values found in both trees.
Whiteboard Process

Examples

Output
100,160,125,175,200,350,500
Unit Tests
- return common values in tree
Stretch Goal
- Describe how you might solve this differently if the parameters were Binary Search Trees.
- What are the potential efficiency differences?
Approach & Efficiency