Bitmask-dp

2 articles

dsa6 min read

Minimum XOR Sum of Two Arrays — Bitmask DP with XOR Pairing

LeetCode 1879 Minimum XOR Sum of Two Arrays — pair every element of nums1 with a unique element of nums2 to minimize total XOR. Bitmask DP turns assignment into a 2^n state space. Step-by-step bit manipulation walkthrough for FAANG interviews.

Read →