This website works better with JavaScript
Home
Esplora
Aiuto
Registrati
Accedi
wolves
/
leetcode
mirror da
https://git.wolves.top/wolves/leetcode.git
Segui
1
Vota
0
Forka
0
File
Problemi
0
Wiki
Albero (Tree):
e1e872380e
Rami (Branch)
Tag
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
Cronologia
Originale
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}