Files
developer-roadmap/roadmaps/datastructures-and-algorithms/content/cyclic-sort@L1FIJAluyxG6CGaVLM20O.md

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.