A list of n + 1 numbers drawn from 1..n must contain a repeat. Find it — and talk through the options from a hash set to O(1) space.
A list of n + 1 numbers drawn from 1..n must contain a repeat. Find it — and talk through the options from a hash set to O(1) space.
Opens with the full question.