Problem description: This problem is based on LeetCode 137. Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one. (Credit to the original author 鄭育丞 who wrote the assembly in assignment 1)
C code implementation
The C code implementation is modified to fit in the emulator as follow:
#define SIZE 10
int singleNumber(int arr[])
{
int lower = 0, higher = 0, mask = 0;