Given an array of n+1 integers, each in the range 1 to n, find an integer that is repeated.
n+1
1
n
I was asked this at a job intervi
for(int i=n+1;i!=a[i];i=a[i]); cout<