Skip to content

Commit 3964b45

Browse files
committed
Create README - LeetHub
1 parent 5de768c commit 3964b45

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

1214-two-sum-bsts/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h2><a href="https://leetcode.com/problems/two-sum-bsts">1150. Two Sum BSTs</a></h2><h3>Medium</h3><hr><p>Given the roots of two binary search trees, <code>root1</code> and <code>root2</code>, return <code>true</code> if and only if there is a node in the first tree and a node in the second tree whose values sum up to a given integer <code>target</code>.</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/10/ex1.png" style="width: 369px; height: 169px;" />
6+
<pre>
7+
<strong>Input:</strong> root1 = [2,1,4], root2 = [1,0,3], target = 5
8+
<strong>Output:</strong> true
9+
<strong>Explanation: </strong>2 and 3 sum up to 5.
10+
</pre>
11+
12+
<p><strong class="example">Example 2:</strong></p>
13+
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/10/ex2.png" style="width: 453px; height: 290px;" />
14+
<pre>
15+
<strong>Input:</strong> root1 = [0,-10,10], root2 = [5,1,7,0,2], target = 18
16+
<strong>Output:</strong> false
17+
</pre>
18+
19+
<p>&nbsp;</p>
20+
<p><strong>Constraints:</strong></p>
21+
22+
<ul>
23+
<li>The number of nodes in each tree is in the range <code>[1, 5000]</code>.</li>
24+
<li><code>-10<sup>9</sup> &lt;= Node.val, target &lt;= 10<sup>9</sup></code></li>
25+
</ul>

0 commit comments

Comments
 (0)