This website works better with JavaScript
Inicio
Explorar
Axuda
Rexistro
Iniciar sesión
wolves
/
leetcode
réplica de
https://git.wolves.top/wolves/leetcode.git
Seguir
1
Destacar
0
Fork
0
Ficheiros
Incidencias
0
Wiki
Árbore:
e1e872380e
Ramas
Etiquetas
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
}