Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Create flash_sort.cpp #2842

Closed

Conversation

AkshatPandey2006
Copy link

Adding the Flash Sort Algorithm

Description of Change
This PR introduces the Flash Sort algorithm under the sorting namespace. Flash Sort is an efficient, distribution-based sorting algorithm that performs exceptionally well on large datasets with uniformly distributed elements. The algorithm partitions the input data into buckets and sorts them locally, leading to better performance compared to traditional sorting algorithms in specific scenarios.

This implementation includes:

Bucket-based distribution of elements based on a linear scaling formula.
Local sorting within each bucket to ensure overall sorted order.
Handling of edge cases, such as arrays with a single element or identical values, ensuring the algorithm works seamlessly for all input sizes.
The implementation also comes with a test suite that verifies the correctness of the algorithm for various data types, including int, float, char, std::string, and std::pair.

Checklist
Added description of change
Added file name matches File name guidelines
Added tests and example, tests must pass
Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
Relevant documentation/comments are added
PR title follows semantic commit guidelines
Searched previous suggestions to avoid duplication
Acknowledge that all contributions are made under the project's license

Notes:
This addition enhances the repository by including an advanced sorting algorithm. Flash Sort offers superior performance in specialized use cases, making it a valuable addition to the collection of sorting techniques.

adding the flash sort algorithm
Copy link
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Nov 15, 2024
Copy link
Contributor

github-actions bot commented Dec 7, 2024

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions bot closed this Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant