This website works better with JavaScript
Strona główna
Odkrywaj
Pomoc
Zarejestruj się
Zaloguj się
wolves
/
leetcode
kopia lustrzana
https://git.wolves.top/wolves/leetcode.git
Obserwuj
1
Polub
0
Forkuj
0
Pliki
Problemy
0
Wiki
Drzewo:
4180df8390
Gałęzie
Tagi
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
Historia
Czysty
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}