diff --git a/solution/0200-0299/0231.Power of Two/README.md b/solution/0200-0299/0231.Power of Two/README.md index 2483012af8107..e3126fa0e15a5 100644 --- a/solution/0200-0299/0231.Power of Two/README.md +++ b/solution/0200-0299/0231.Power of Two/README.md @@ -183,7 +183,7 @@ func isPowerOfTwo(n int) bool { ```ts function isPowerOfTwo(n: number): boolean { - return n > 0 && (n & (n - 1)) == 0; + return n > 0 && (n & (n - 1)) === 0; } ``` @@ -191,7 +191,7 @@ lowbit: ```ts function isPowerOfTwo(n: number): boolean { - return n > 0 && (n & (n - 1)) == 0; + return n > 0 && (n & (n - 1)) === 0; } ``` diff --git a/solution/0200-0299/0231.Power of Two/README_EN.md b/solution/0200-0299/0231.Power of Two/README_EN.md index 40d60f5d849f3..8a2f4b5be62c1 100644 --- a/solution/0200-0299/0231.Power of Two/README_EN.md +++ b/solution/0200-0299/0231.Power of Two/README_EN.md @@ -146,7 +146,7 @@ func isPowerOfTwo(n int) bool { ```ts function isPowerOfTwo(n: number): boolean { - return n > 0 && (n & (n - 1)) == 0; + return n > 0 && (n & (n - 1)) === 0; } ``` @@ -154,7 +154,7 @@ lowbit: ```ts function isPowerOfTwo(n: number): boolean { - return n > 0 && n == (n & -n); + return n > 0 && n === (n & -n); } ``` diff --git a/solution/0200-0299/0231.Power of Two/Solution.ts b/solution/0200-0299/0231.Power of Two/Solution.ts index 5c4abb675d1da..bfb580cec5184 100644 --- a/solution/0200-0299/0231.Power of Two/Solution.ts +++ b/solution/0200-0299/0231.Power of Two/Solution.ts @@ -1,3 +1,3 @@ function isPowerOfTwo(n: number): boolean { - return n > 0 && (n & (n - 1)) == 0; + return n > 0 && (n & (n - 1)) === 0; }