Who is the intruder ?

Problem statement

Let an array of integers where each element is repeated 3 times except one of them which is unique.
The goal is to find this element. The solution must have a linear time complexity O(n) and a constant memory complexity O(1).

For example, if we consider the following array: [4 7 8 4 5 7 8 4 7 8] then the solution must return 5.