Write a function that accepts an array of numbers (where each number appears three times except for one which appears only once) and finds that unique number in the array and returns it.
singleNumber([2, 2, 3, 2]) ➞ 3
singleNumber([0, 1, 0, 1, 0, 1, 99]) ➞ 99
singleNumber([-1, 2, -4, 20, -1, 2, -4, -4, 2, -1]) ➞ 20The function needs to be efficient in order to run under 12,000 milliseconds.