- May
- 3,515
- 5
Oh, I forgot to unset the array.
Using the array simplifies the job because it is inherently sorted, and setting to 1 can be repeated infinitely without duplications, so neither the sorting nor the removal of duplicates is necessary.
Using the array simplifies the job because it is inherently sorted, and setting to 1 can be repeated infinitely without duplications, so neither the sorting nor the removal of duplicates is necessary.