Write a function that can find and return the element that appears exactly once. code example
Example: Given an array of integers, every element appears thrice except for one which occurs once.
// declaring an array double[] data; // allocating memory data = new Double[5];