All Posts

1276 articles

dsa1 min read

Sum of Two Integers — Bit Addition

Add two integers without + or - operators. Simulate: sum = a XOR b (no carry), carry = (a AND b) << 1. Repeat until carry = 0.

Read →
dsa1 min read

Subsets — Bitmask Enumeration

Generate all subsets of an array. Each subset corresponds to a bitmask of n bits where bit i = 1 means element i is included.

Read →
Page 32 of 256