Design a Number Container System
Track each index’s number and the set of indices holding each number in hash maps, so a change moves one index between sets.
Track each index’s number and the set of indices holding each number in hash maps, so a change moves one index between sets.