Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 430 Bytes

File metadata and controls

13 lines (10 loc) · 430 Bytes

Tree Intersection

Challenge Summary

Write a function called tree_intersection that takes two binary trees as parameters and return a set of values found in both trees.

Approach & Efficiency

Method Time Complexity Space Complexity
preOrder O(n) O(n)
treeIntersection O(n) O(n)

Sources

How can I find matching values in two arrays