Back to all patterns

Math or XOR

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Math or XOR pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Easy (1)

Missing Number

Find the missing number in array containing n distinct numbers from 0 to n.

Key Signals:

Sum formula or XORExpected sum - actual sumOr XOR all indices and values