Skip to content

Commit fd42ca9

Browse files
committed
Added README.md file for Binary Tree Paths
1 parent a897051 commit fd42ca9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

257-binary-tree-paths/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<h2><a href="https://leetcode.com/problems/binary-tree-paths">Binary Tree Paths</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p>Given the <code>root</code> of a binary tree, return <em>all root-to-leaf paths in <strong>any order</strong></em>.</p>
2+
3+
<p>A <strong>leaf</strong> is a node with no children.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
<img alt="" src="https://assets.leetcode.com/uploads/2021/03/12/paths-tree.jpg" style="width: 207px; height: 293px;" />
8+
<pre>
9+
<strong>Input:</strong> root = [1,2,3,null,5]
10+
<strong>Output:</strong> [&quot;1-&gt;2-&gt;5&quot;,&quot;1-&gt;3&quot;]
11+
</pre>
12+
13+
<p><strong class="example">Example 2:</strong></p>
14+
15+
<pre>
16+
<strong>Input:</strong> root = [1]
17+
<strong>Output:</strong> [&quot;1&quot;]
18+
</pre>
19+
20+
<p>&nbsp;</p>
21+
<p><strong>Constraints:</strong></p>
22+
23+
<ul>
24+
<li>The number of nodes in the tree is in the range <code>[1, 100]</code>.</li>
25+
<li><code>-100 &lt;= Node.val &lt;= 100</code></li>
26+
</ul>

0 commit comments

Comments
 (0)