Skip to content

Commit 0790b0e

Browse files
committed
commit
Change-Id: I820959b1cfc713576e66ee7653b8ab36ac7418c3
1 parent 5e1d814 commit 0790b0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

[0669][Trim a Binary Search Tree]/src/Solution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ public TreeNode trimBST(TreeNode root, int L, int R) {
1313

1414
if (root.val == L) {
1515
root.left = null;
16-
root.right = trimBST(root, L, R);
16+
root.right = trimBST(root.right, L, R);
1717
return root;
1818
} else if (root.val == R) {
19-
root.right = null;
2019
root.left = trimBST(root.left, L, R);
20+
root.right = null;
2121
return root;
2222
} else if (root.val < L) {
2323
return trimBST(root.right, L, R);

0 commit comments

Comments
 (0)