Cyclic Sort

Given a range of interval. Note: every numbers have to present. For example given a range from 1 - 10. You need to have all 10 numbers.

Pasted image 20221226193801.png

Time Complexity: $O(n)$
Ways to identify:

  • Ask to find the missing, duplicate, smallest number in an sorted or rotated array.