Status: IN
`last_seen[num]` always holds the most recent index where `num` appeared — the unconditional overwrite after each check maintains this invariant, which is what makes it safe to discard older indices.
Source: entries/2026/06/06/contains-duplicate-ii-solution.md