4 ms·
I think they meant that XOR avoids the overflow risk, whereas doing the sum of the array to figure out which number could cause an overflow.
by ikurei 1y ago
I think they meant that XOR avoids the overflow risk, whereas doing the sum of the array to figure out which number could cause an overflow.
- jonathrg 1y ago(wrapping) overflow doesn't affect the final result.