Thursday, September 16, 2010

Find two repeated numbers in an array

How to find two repeated number in an array[513] , it contains numbers from 1 to 511. So there are two numbers which are repeated. All remaining numbers are distinct.
How to find the two repeated number?.