The problem description doesn't mention that there won't be any repeats, for example:
but none of the posted solutions (in this forum) seem to be handling that case. It seems that the test-cases are missing repeated numbers.
What do you mean the solutions don't handle it? Do any of them give you a wrong answer for that input?
@StefanPochmann oops, I missed the fact that the O(1) space solutions all check a[i] != a[a[i]] before swapping them both.
My bad :-/