- Time:O(mn), where m = |\text{nodes}| \in s and n = |\text{nodes}| \in t
- Space:O(h), where h = \text{height(s)}
C++ |
---|
|
JAVA |
---|
|
C++ |
---|
|
JAVA |
---|
|