Skip to content

Commit 650b4c7

Browse files
binary search fixed
1 parent c2609ae commit 650b4c7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎lectures/16-math/code/src/com/kunal/maths/BinarySearchSQRT.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static double sqrt(int n, int p) {
2626
e = m - 1;
2727
} else {
2828
s = m + 1;
29+
root = m;
2930
}
3031
}
3132
double incr = 0.1;

0 commit comments

Comments
 (0)