173. Single Number III

In an array, exactly two elements appear once, and all others appear twice. Return both unique elements in any order.
Example 1
Input: nums = [-1,0]
Output: [-1,0]
Explanation: Both elements are unique.
Example 2
Input: nums = [1,2,1,3,2,5]
Output: [3,5]
Explanation: 3 and 5 each appear once.
arraysbit manipulationmedium
JavaScript
Loading...
Line 1, Char 1