mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-28 02:43:08 +08:00
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
336 B
336 B
Cyclic Sort
Cyclic sort is a sorting technique for arrays whose values fall in a known, contiguous range, typically 1 to n. Each element is swapped to the position matching its value, placing everything correctly in O(n) time and O(1) space — ideal as a building block for problems such as finding missing or duplicate numbers.