Given a stream of n integers between 1 and n find one number that repeats in linear time using less than O(n) space and traversing the stream sequentially O(1) times?
How many times does number 1 appear in a 1 to N series of numbers? I need a logical explanation, not one using the computer.