← ALL NOTES
Array

137. Single Number II

Now every number appears three times except one. The XOR trick from #136 is dead on arrival — XOR cancels in pairs, and three isn't two. What you actually want, bit by bit, is a counter that resets…

Loading…