Skip to content

Commit 2252a0e

Browse files
refactor 669
1 parent e25ef9d commit 2252a0e

File tree

1 file changed

+0
-44
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-44
lines changed

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

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,6 @@
22

33
import com.fishercoder.common.classes.TreeNode;
44

5-
/**
6-
* 669. Trim a Binary Search Tree
7-
*
8-
* Given a binary search tree and the lowest and highest boundaries as L and R,
9-
* trim the tree so that all its elements lies in [L, R] (R >= L).
10-
* You might need to change the root of the tree, so the result should return the new root of the trimmed binary search tree.
11-
12-
Example 1:
13-
14-
Input:
15-
1
16-
/ \
17-
0 2
18-
19-
L = 1
20-
R = 2
21-
22-
Output:
23-
1
24-
\
25-
2
26-
27-
Example 2:
28-
29-
Input:
30-
3
31-
/ \
32-
0 4
33-
\
34-
2
35-
/
36-
1
37-
38-
L = 1
39-
R = 3
40-
41-
Output:
42-
3
43-
/
44-
2
45-
/
46-
1
47-
48-
*/
495
public class _669 {
506
public static class Solution1 {
517
public TreeNode trimBST(TreeNode root, int L, int R) {

0 commit comments

Comments
 (0)