This website works better with JavaScript
Página inicial
Explorar
Ajuda
Registrar
Entrar
wolves
/
leetcode
mirror de
https://git.wolves.top/wolves/leetcode.git
Observar
1
Favorito
0
Fork
0
Arquivos
Issues
0
Wiki
Tree:
e1e872380e
Branches
Tags
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
Histórico
Raw
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}