Without looking at anyone else’s answer:
My reasoning is that if the best sorting thing is nlogn, then it seems fairly trivial (heh) to cut the sort short if you find a copy.
This presumably won’t be O(n), but will be shorter than O(nlogn) - I guess probability will have something to say about the Order of this?
Maybe?