Skip to content

Commit a4f285d

Browse files
Create README - LeetHub
1 parent 3c6be88 commit a4f285d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

invert-binary-tree/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<h2>226. Invert Binary Tree</h2><h3>Easy</h3><hr><div><p>Given the <code>root</code> of a binary tree, invert the tree, and return <em>its root</em>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong>Example 1:</strong></p>
5+
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg" style="width: 500px; height: 165px;">
6+
<pre><strong>Input:</strong> root = [4,2,7,1,3,6,9]
7+
<strong>Output:</strong> [4,7,2,9,6,3,1]
8+
</pre>
9+
10+
<p><strong>Example 2:</strong></p>
11+
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/14/invert2-tree.jpg" style="width: 500px; height: 120px;">
12+
<pre><strong>Input:</strong> root = [2,1,3]
13+
<strong>Output:</strong> [2,3,1]
14+
</pre>
15+
16+
<p><strong>Example 3:</strong></p>
17+
18+
<pre><strong>Input:</strong> root = []
19+
<strong>Output:</strong> []
20+
</pre>
21+
22+
<p>&nbsp;</p>
23+
<p><strong>Constraints:</strong></p>
24+
25+
<ul>
26+
<li>The number of nodes in the tree is in the range <code>[0, 100]</code>.</li>
27+
<li><code>-100 &lt;= Node.val &lt;= 100</code></li>
28+
</ul>
29+
</div>

0 commit comments

Comments
 (0)