data-structures-and-algorithms

401 data structures and algorithms code challenges


Project maintained by alsosteve Hosted on GitHub Pages — Theme by mattgraham

Data Structures and Algorithms

Language: Python

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

challenge32

Examples

Input

tree1 tree2

Output

100,160,125,175,200,350,500

Unit Tests

Stretch Goal

Approach & Efficiency