Skip to content

Commit ee193ed

Browse files
committed
Create README - LeetHub
1 parent ee3fa39 commit ee193ed

File tree

1 file changed

+29
-0
lines changed
  • binary-tree-zigzag-level-order-traversal

1 file changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<h2>103. Binary Tree Zigzag Level Order Traversal</h2><h3>Medium</h3><hr><div><p>Given the <code>root</code> of a binary tree, return <em>the zigzag level order traversal of its nodes' values</em>. (i.e., from left to right, then right to left for the next level and alternate between).</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong>Example 1:</strong></p>
5+
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/19/tree1.jpg" style="width: 277px; height: 302px;">
6+
<pre><strong>Input:</strong> root = [3,9,20,null,null,15,7]
7+
<strong>Output:</strong> [[3],[20,9],[15,7]]
8+
</pre>
9+
10+
<p><strong>Example 2:</strong></p>
11+
12+
<pre><strong>Input:</strong> root = [1]
13+
<strong>Output:</strong> [[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, 2000]</code>.</li>
27+
<li><code>-100 &lt;= Node.val &lt;= 100</code></li>
28+
</ul>
29+
</div>

0 commit comments

Comments
 (0)