- retrieve all elements from two binary trees
- return them in sorted order
- can conduct a DFS on both trees, appending each visited node to a list
- sort the list and then return it
π€What Did I Struggle With?
~
π‘ Explanation of Solution
same as intuition
β Complexity Analysis
Time Complexity: O(n + m (log (m + n))
- traversal + sorting of list
Space Complexity: O(n + m)
- storage of elements in the trees in a list