Practice Problem

Single Number II

Difficulty: Medium

Given an integer array where every element appears exactly three times except for one element which appears exactly once, find the single element. The solution must use linear time and constant extra space.