โ† Samsung questions

Replace repeated numbers with unique numbers in range

Filed under Samsung

The question

Given an array of repeated numbers within a range, identify duplicates and replace them with unused numbers from the range in O(N) time and without extra space.

No write-up yet. Related questions below have one.

Related Samsung questions

Collected from public candidate posts and coding forums. Updated Nov 2026.