Skip to content

Commit edad6e5

Browse files
refactor 1214
1 parent f154fff commit edad6e5

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/main/java/com/fishercoder/solutions/_1214.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,6 @@
55
import java.util.ArrayList;
66
import java.util.List;
77

8-
/**
9-
* 1214. Two Sum BSTs
10-
*
11-
* Given two binary search trees,
12-
* return True 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 target.
13-
*
14-
* Example 1:
15-
* 2 1
16-
* / \ / \
17-
* 1 4 0 3
18-
*
19-
* Input: root1 = [2,1,4], root2 = [1,0,3], target = 5
20-
* Output: true
21-
* Explanation: 2 and 3 sum up to 5.
22-
*
23-
* Example 2:
24-
* 0 5
25-
* / \ / \
26-
* -10 10 1 7
27-
* / \
28-
* 0 2
29-
*
30-
* Input: root1 = [0,-10,10], root2 = [5,1,7,0,2], target = 18
31-
* Output: false
32-
*
33-
* Constraints:
34-
* Each tree has at most 5000 nodes.
35-
* -10^9 <= target, node.val <= 10^9
36-
* */
378
public class _1214 {
389
public static class Solution1 {
3910
public boolean twoSumBSTs(TreeNode root1, TreeNode root2, int target) {

0 commit comments

Comments
 (0)