This website works better with JavaScript
首頁
探索
說明
註冊
登入
wolves
/
leetcode
镜像来自
https://git.wolves.top/wolves/leetcode.git
關註
1
讚好
0
複刻
0
Files
問題管理
0
Wiki
目錄樹:
4180df8390
分支列表
標籤列表
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
文件歷史
原始文件
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}