Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 21d491e

Browse files
committed
Create README - LeetHub
1 parent b07cf23 commit 21d491e

File tree

1 file changed

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

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<h2><a href="https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/">103. Binary Tree Zigzag Level Order Traversal</a></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 class="example">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 class="example">Example 2:</strong></p>
11+
12+
<pre><strong>Input:</strong> root = [1]
13+
<strong>Output:</strong> [[1]]
14+
</pre>
15+
16+
<p><strong class="example">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)

AltStyle によって変換されたページ (->オリジナル) /