<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>位运算 on Heeepin</title><link>https://heeeepin.com/tags/%E4%BD%8D%E8%BF%90%E7%AE%97/</link><description>Recent content in 位运算 on Heeepin</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Mon, 04 Apr 2022 20:35:06 +0800</lastBuildDate><atom:link href="https://heeeepin.com/tags/%E4%BD%8D%E8%BF%90%E7%AE%97/index.xml" rel="self" type="application/rss+xml"/><item><title>区域和检索</title><link>https://heeeepin.com/post/leetcode307-%E5%8C%BA%E5%9F%9F%E5%92%8C%E6%A3%80%E7%B4%A2/</link><pubDate>Mon, 04 Apr 2022 20:35:06 +0800</pubDate><guid>https://heeeepin.com/post/leetcode307-%E5%8C%BA%E5%9F%9F%E5%92%8C%E6%A3%80%E7%B4%A2/</guid><description>1 2 3 4 5 6 7 8 x &amp;amp; (x - 1) 消除掉x最后边的1位1 // 计算x最后一位1代表多少 func lowbit(x int) int { return x &amp;amp; (-x) } 所以 x &amp;amp;= x - 1 和 x -= lowbit(x) 是等价的 这道题用到了树状</description></item><item><title>重复的DNA序列</title><link>https://heeeepin.com/post/leetcode187-%E9%87%8D%E5%A4%8D%E7%9A%84dna%E5%BA%8F%E5%88%97/</link><pubDate>Wed, 30 Mar 2022 23:46:14 +0800</pubDate><guid>https://heeeepin.com/post/leetcode187-%E9%87%8D%E5%A4%8D%E7%9A%84dna%E5%BA%8F%E5%88%97/</guid><description>DNA序列 由一系列核苷酸组成，缩写为 &amp;lsquo;A&amp;rsquo;, &amp;lsquo;C&amp;rsquo;, &amp;lsquo;G&amp;rsquo; 和 &amp;lsquo;T&amp;rsquo;.。 例如，&amp;ldquo;ACGAATTCCG&amp;rdquo; 是一个 D</description></item><item><title>交替的二进制位</title><link>https://heeeepin.com/post/leetcode693-%E4%BA%A4%E6%9B%BF%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E4%BD%8D/</link><pubDate>Mon, 28 Mar 2022 23:01:43 +0800</pubDate><guid>https://heeeepin.com/post/leetcode693-%E4%BA%A4%E6%9B%BF%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E4%BD%8D/</guid><description>给定一个正整数，检查它的二进制表示是否总是 0、1 交替出现：换句话说，就是二进制表示中相邻两位的数字永不相同。 二进制法 1 2 3 4 5 6 func hasAlternatingBits(n int) bool { //</description></item></channel></rss>