LeetCode

Same Tree

Approach 1: ⭐⭐

asdasdasd

Note that in the isSameTree() method, we can replace the first two lines of code with if (s == null || t == null) return s == t; However, this is arguably less readable.

Complexity Analysis

Approach 2: asdasdasd Morris Traversal ⭐

Complexity Analysis