225. Single Number - II
Given an array nums where each integer in nums appears thrice except one. Find out the number that has appeared only once.
Example 1:
Input : nums = [2, 2, 2, 3]
Output : 3
Explanation : The integers 3 has appeared only once.
Example 2:
Input : nums = [1, 0, 3, 0, 1, 1, 3, 3, 10, 0]
Output : 10
Explanation : The integers 10 has appeared only once.
Now Your Turn!
Pick the correct output for the given inputInput : nums = [5, 0, 1, 10, 1, 1, 5, 5, 10, 10]
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 1 <= n <= 3*104
- -231 <= nums[i] <= 231 - 1