Question: Given an array of N integer such that only one integer is repeated. Find the repeated integer in O(n) time and constant space. There is no range for the value of integers or the value of N

For example given an array of 6 integers as 23 45 67 87 23 47. The answer is 23
(I hope this covers ambiguous and vague part)

I searched on the net but was unable to find any such question in which range of integers was not fixed.
Also [here](http://aperiodic.net/phil/archives/Geekery/find-duplicate-elements.html) is an example that answers a similar question to mine but here he created a hash table with the highest integer value in C++.But the cpp does not allow such to create an array with 2^64 element(on a 64-bit computer).

I am sorry I didn't mention it before the array is immutable

Answer: 
If the array isn't sorted, you can only do it in `O(nlogn)`.

Some approaches can be found [here](http://aperiodic.net/phil/archives/Geekery/find-duplicate-elements.html).
As was already mentioned by others, I don't see any way to do it in O(n). 

However, you can try a probabilistic approach by using a [Bloom Filter](http://en.wikipedia.org/wiki/Bloom_filter). It will give you O(n) if you are lucky.