An array of length n+1 is given which is filled with the numbers 1... n such that only 1 number is repeated. Find the repeated number.
Another variation of the problem asks to find repeated numbers if there are two such repetitions.
1 year ago
Feel free to contribute, however it will be moderated to curb spams.
An array of length n+1 is given which is filled with the numbers 1... n such that only 1 number is repeated. Find the repeated number.
Another variation of the problem asks to find repeated numbers if there are two such repetitions.
No comments:
Post a Comment