Skip to content

Create Cycle sort algorithm#404

Merged
larymak merged 3 commits into
larymak:mainfrom
KavinduDr:main
Jan 16, 2025
Merged

Create Cycle sort algorithm#404
larymak merged 3 commits into
larymak:mainfrom
KavinduDr:main

Conversation

@KavinduDr

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown

Hi @KavinduDr! 👋

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

@larymak

larymak commented Jan 14, 2025

Copy link
Copy Markdown
Owner

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
@maihengxing999

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants