<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bit Manipulation on prometheus</title><link>https://new.halfrost.com/zh/categories/bit-manipulation/</link><description>Recent content in Bit Manipulation on prometheus</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><copyright>halfrost</copyright><lastBuildDate>Sat, 09 Nov 2019 08:27:00 +0000</lastBuildDate><atom:link href="https://new.halfrost.com/zh/categories/bit-manipulation/index.xml" rel="self" type="application/rss+xml"/><item><title>Algorithm in LeetCode —— Bit Manipulation</title><link>https://new.halfrost.com/zh/bit_manipulation/</link><pubDate>Sat, 09 Nov 2019 08:27:00 +0000</pubDate><guid>https://new.halfrost.com/zh/bit_manipulation/</guid><description>Bit Manipulation 的 Tips: 异或的特性。第 136 题，第 268 题，第 389 题，第 421 题， x ^ 0 = x x ^ 11111……1111 = ~x x ^ (~x) = 11111……1111 x ^ x = 0 a ^ b = c =&amp;gt; a ^ c = b =&amp;gt; b ^ c = a (交换律) a ^ b ^ c = a ^ (b ^ c) = (a ^ b）^ c (结合律) 构造特殊 Mask，将特殊位置放 0 或 1。 1.</description></item></channel></rss>