Given a stream of n integers between 1 and n find one number that repeats in linear time using less than O -LRB- n -RRB- space and traversing the stream sequentially O -LRB- 1 -RRB- times ?
Is O -LRB- Log n -RRB- close to O -LRB- n -RRB- or O -LRB- 1 -RRB- ?