Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit b2ba408

Browse files
committed
Update problem 476
1 parent be31dba commit b2ba408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

algorithms/476/solution.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
// Time and space complexity, O(1)
44
func findComplement(num int) int {
55
var c int
6-
for m := 1; num != 0; m, num = m*2, num>>1 {
6+
for m := 1; num != 0; m, num = m<<1, num>>1 {
77
if num&1 != 1 {
88
c += m
99
}

0 commit comments

Comments
 (0)