Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

位运算 #2

Open
jiangshanmeta opened this issue Oct 10, 2018 · 0 comments
Open

位运算 #2

jiangshanmeta opened this issue Oct 10, 2018 · 0 comments

Comments

@jiangshanmeta
Copy link
Owner

jiangshanmeta commented Oct 10, 2018

异或

a^b^b = a^0 = a 即利用异或可以成对消去重复元素

相关题目: 389

&

  • 318 Maximum Product of Word Lengths

  • 1009 Complement of Base 10 Integer &取数字二进制最后一位 << 乘2 >> 除2

  • 868 >>除2 &获取二进制最后一位

  • 693 Binary Number with Alternating Bits &获取二进制最后一位

  • 461 Hamming Distance

  • 476 Number Complement

  • 477

  • 338 Counting Bits 右移 &

  • 371 位运算实现加法

  • 201

  • 260 (^ a^b^b=a)

  • 136 xor

  • 190 &取数字二进制最后一位 左移 右移

  • 191

  • 397

  • 762(求连续数二进制1的个数)

  • 1239 利用32位表示用过的字符 有点意思

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant