Skip to content

Commit 2b0d93b

Browse files
committed
update condition
1 parent bcb6eca commit 2b0d93b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/LeetCode/src/Sqrt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Implement int sqrt(int x).
2727
*/
2828

2929
public static int mySqrt(int x) {
30-
if (x <= 0) {
30+
if (x < 1) {
3131
return 0;
3232
}
3333

0 commit comments

Comments
 (0)