Skip to content

Create Cycle sort algorithm #404

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Jan 16, 2025
Merged

Create Cycle sort algorithm #404

merged 3 commits into from
Jan 16, 2025

Conversation

KavinduDr
Copy link
Contributor

No description provided.

Copy link

Hi @KavinduDr! 👋

Thank you for submitting a pull request! We appreciate your contribution and will review your changes as soon as possible.

@larymak
Copy link
Owner

larymak commented Jan 14, 2025

Attach a README file with the explanation below or a modified one.

This pull request introduces a new implementation of the Cycle Sort algorithm in the Data Structures and Algorithms/Sorting Algorithms/Cycle_Sort.py file. The new function sorts a list of integers and counts the number of writes performed during the sorting process.

Key changes include:

  • Added the cycle_sort function to implement the Cycle Sort algorithm, which sorts a list of integers and returns the number of writes performed.
  • Included a main section to demonstrate the usage of the cycle_sort function, which prints the list before and after sorting, as well as the number of writes.

@larymak larymak merged commit 5033d88 into larymak:main Jan 16, 2025
1 check passed
@maihengxing999
Copy link

[Create Cycle_Sort.py]
[Update Cycle_Sort.py]

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants