We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e25ef9d commit 2252a0eCopy full SHA for 2252a0e
src/main/java/com/fishercoder/solutions/_669.java
@@ -2,50 +2,6 @@
2
3
import com.fishercoder.common.classes.TreeNode;
4
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
24
- \
25
- 2
26
27
- Example 2:
28
29
30
- 3
31
32
-0 4
33
34
35
- /
36
-1
37
38
39
- R = 3
40
41
42
43
44
45
46
47
48
- */
49
public class _669 {
50
public static class Solution1 {
51
public TreeNode trimBST(TreeNode root, int L, int R) {
0 commit comments