<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>算法 on Niweea’s Blog</title><link>https://niweea.github.io/categories/%E7%AE%97%E6%B3%95/</link><description>Recent content in 算法 on Niweea’s Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 07 Jun 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://niweea.github.io/categories/%E7%AE%97%E6%B3%95/index.xml" rel="self" type="application/rss+xml"/><item><title>你必须知道的位运算</title><link>https://niweea.github.io/posts/bit_operation/</link><pubDate>Fri, 04 Jun 2021 18:35:04 +0800</pubDate><guid>https://niweea.github.io/posts/bit_operation/</guid><description>&lt;p&gt;位运算直接操作二进制位，在判断性质、压缩状态和优化性能时非常高效。下面整理几个实用技巧与对应 LeetCode 题目。&lt;/p&gt;&#10;&lt;h2 id="检测两个整数是否符号相反" class="relative group"&gt;检测两个整数是否符号相反 &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#%e6%a3%80%e6%b5%8b%e4%b8%a4%e4%b8%aa%e6%95%b4%e6%95%b0%e6%98%af%e5%90%a6%e7%ac%a6%e5%8f%b7%e7%9b%b8%e5%8f%8d" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;^&lt;/code&gt;（异或）两值对应位不同时结果为 1。&lt;/p&gt;</description></item></channel></rss>