Single Number II
Solution ApproachWas this helpful?
Medium•bits•Expected: O(n) time, O(1) space
bit-manipulation
Problem
Given an integer array where every element appears three times except for one which appears exactly once, find the single element.
Example 1:
Input: nums = [2, 2, 3, 2]
Output: 3
Example 2:
Input: nums = [0, 1, 0, 1, 0, 1, 99]
Output: 99
Reference solution unlocks after your first submission
Loading...
