Xor

8 articles

dsa5 min read

Bit Manipulation — Complete Guide

Master bit manipulation: XOR tricks, counting bits, bitmask DP, Brian Kernighan, two's complement, and 5-language operators.

Read →
dsa1 min read

Single Number III — XOR Partition

Two numbers appear once, rest appear twice. XOR all to get a^b, then use any set bit to partition numbers into two groups.

Read →