solve 3Q except single-number-ii with O(N) space and time complexity