Problems > Exactly One Side > Editorial

Exactly One Side — Solution & Editorial

Back to the Problem

Set symmetric difference: |A ∪ B| − |A ∩ B|, or XOR the sets directly.

Complexity: O(N)