Skip to content

Commit c3613db

Browse files
committed
Create readme : 0101-symmetric-tree
1 parent a3dfa91 commit c3613db

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><a href="https://leetcode.com/problems/symmetric-tree">101. Symmetric Tree</a></h2><h3>Easy</h3><hr><p>Given the <code>root</code> of a binary tree, <em>check whether it is a mirror of itself</em> (i.e., symmetric around its center).</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/19/symtree1.jpg" style="width: 354px; height: 291px;" />
6+
<pre>
7+
<strong>Input:</strong> root = [1,2,2,3,4,4,3]
8+
<strong>Output:</strong> true
9+
</pre>
10+
11+
<p><strong class="example">Example 2:</strong></p>
12+
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/19/symtree2.jpg" style="width: 308px; height: 258px;" />
13+
<pre>
14+
<strong>Input:</strong> root = [1,2,2,null,3,null,3]
15+
<strong>Output:</strong> false
16+
</pre>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Constraints:</strong></p>
20+
21+
<ul>
22+
<li>The number of nodes in the tree is in the range <code>[1, 1000]</code>.</li>
23+
<li><code>-100 &lt;= Node.val &lt;= 100</code></li>
24+
</ul>
25+
26+
<p>&nbsp;</p>
27+
<strong>Follow up:</strong> Could you solve it both recursively and iteratively?

0 commit comments

Comments
 (0)