I have a question and I tried to think over it again and again... but got nothing so posting the question here. Maybe I could get some view-point of others, to try and make it w
You can use this algorithm:
int GetSpecialOne(int[] array, int length) { int specialOne = array[0]; for(int i=1; i < length; i++) { specialOne ^= array[i]; } return specialOne; }
Solved with the help of a similar question which can be found here on http://www.technicalinterviewquestions.net