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 b7d7112 commit 9e27d16Copy full SHA for 9e27d16
Bit-Manipulation/SetBit.js
@@ -7,7 +7,7 @@
7
* bit binary representations of the number and
8
* returns a number after comparing each bit.
9
*
10
- * 0 | 0 -> 0
+ * 0 | 0 -> 0
11
* 0 | 1 -> 1
12
* 1 | 0 -> 1
13
* 1 | 1 -> 1
Maths/FindLcm.js
@@ -31,7 +31,11 @@ const findLcm = (num1, num2) => {
31
32
while (true) {
33
if (lcm % num1 === 0 && lcm % num2 === 0) break
34
- lcm += maxNum
+ if (num1 > num2) {
35
+ maxNum = num1
36
+ } else {
37
+ maxNum = num2
38
+ }
39
}
40
return lcm
41
0 commit comments