Lets say you have array like :
int[] arr={-1,2,3,2,-1,1,2,4,5,4,5} in this array only one element is there which is 3 times .
so we need to return the element which is 3 times and all other elelent is duplictaes.
Condtition :
the code should be in O(n) time complexity and O(1) space complexity.