Make it faster with a set of what you've seen
On 100,000 IDs, looking back at every earlier ID means about 5 billion comparisons. That's minutes. The fix is to remember what you've seen in a set: asking whether a set holds something takes about the same time however big the set is, while in on a list reads it item by item.
seen = set()
print(3 in seen)
seen.add(3)
seen.add(3)
print(3 in seen, len(seen))
False
True 1
A set holds each value once, and in answers at once. So one pass is enough: for each ID, ask whether it's in the set, and only then add it. Interviewers want the cost in big-O notation, which says how the work grows with n, the length of the input. One pass is O(n) time: twice the IDs, twice the time. Looking back at every earlier ID is O(n²): twice the IDs, four times the time. The set also takes O(n) memory. Say both costs out loud. That's move 5.
In the editor, write first_repeat(ids) in one pass with a set. The same checks must still print ok.