We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e56401 commit 39c9807Copy full SHA for 39c9807
Maths/SquareRootLogarithmic.js
@@ -21,17 +21,17 @@ const squareRootLogarithmic = (num) => {
21
}
22
let answer = 0
23
let sqrt = 0
24
- let e = num
+ let edge = num
25
26
- while (sqrt <= e) {
27
- const mid = Math.trunc((sqrt + e) / 2)
+ while (sqrt <= edge) {
+ const mid = Math.trunc((sqrt + edge) / 2)
28
if (mid * mid === num) {
29
return mid
30
} else if (mid * mid < num) {
31
sqrt = mid + 1
32
answer = mid
33
} else {
34
- e = mid - 1
+ edge = mid - 1
35
36
37
0 commit comments