Skip to content

Commit 9e27d16

Browse files
committed
changed the sentence structure
1 parent b7d7112 commit 9e27d16

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Bit-Manipulation/SetBit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* bit binary representations of the number and
88
* returns a number after comparing each bit.
99
*
10-
* 0 | 0 -> 0
10+
* 0 | 0 -> 0
1111
* 0 | 1 -> 1
1212
* 1 | 0 -> 1
1313
* 1 | 1 -> 1

Maths/FindLcm.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ const findLcm = (num1, num2) => {
3131

3232
while (true) {
3333
if (lcm % num1 === 0 && lcm % num2 === 0) break
34-
lcm += maxNum
34+
if (num1 > num2) {
35+
maxNum = num1
36+
} else {
37+
maxNum = num2
38+
}
3539
}
3640
return lcm
3741
}

0 commit comments

Comments
 (0)