This website works better with JavaScript
Acasă
Explorează
Ajutor
Înregistrare
Autentificare
wolves
/
leetcode
oglindă de
https://git.wolves.top/wolves/leetcode.git
Urmărește
1
Stea
0
Bifurcare
0
Fisiere
Probleme
0
Wiki
Arbore:
62acda6cf7
Ramuri
Etichete
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
Istoric
Crud
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}