DSA Master
Home
Problems
123
Schedule
17 Patterns
Data Structures
PDF Guide
Back to Problems
Mark as Complete
Same Tree
#100
Easy
Binary Tree
O(n)
O(h)
Amazon
Microsoft
Bloomberg
View on LeetCode
Description
Approach
Solution
Related
Problem Description
Given the roots of two binary trees p and q, write a function to check if they are the same or not.