algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Refactor cycle_sort and add comprehensive test cases

Open ShringariV opened this issue 1 year ago • 0 comments

Refactored cycle_sort for improved readability and conciseness by simplifying the nested loops and removing redundant comments. Added multiple test cases to cover various scenarios, including already sorted, reverse sorted, single element, empty arrays, arrays with duplicates, large random arrays, and arrays with negative numbers.

ShringariV avatar Sep 25 '24 20:09 ShringariV