All Posts

1276 articles

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 →
dsa1 min read

Reverse Bits — 32-Bit Reversal

Reverse bits of a 32-bit unsigned integer. Shift result left and input right 32 times, taking last bit each time.

Read →
Page 31 of 256