Solution: Single Number II
Let's solve the Single Number II problem using the Bitwise Manipulation pattern.
We'll cover the following...
Statement
Given a non-empty array arr
, in which exactly two elements appear once, and all the other elements appear twice, return the two elements that appeared only once.
Note: The result can be returned in any order. The solution should use only constant extra space.
Constraints:
arr.length
...
Access this course and 1400+ top-rated courses and projects.