Skip to content

Commit e24331a

Browse files
authored
Update Solution.kt
1 parent 9d3926b commit e24331a

File tree

1 file changed

+1
-2
lines changed
  • src/main/kotlin/g0701_0800/s0701_insert_into_a_binary_search_tree

1 file changed

+1
-2
lines changed

src/main/kotlin/g0701_0800/s0701_insert_into_a_binary_search_tree/Solution.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ class Solution {
2323
if (root == null) {
2424
return TreeNode(value)
2525
}
26-
2726
when {
2827
root.value < value -> root.right = insertIntoBST(root.right, value)
2928
root.value > value -> root.left = insertIntoBST(root.left, value)
3029
}
31-
3230
return root
3331
}
32+
3433
private val TreeNode.value get() = `val`
3534
}

0 commit comments

Comments
 (0)