https://github.com/arvid-berndtsson/rust-sorting-algorithms

Comprehensive collection of sorting algorithms implemented in Rust, complete with performance testing and unit tests.

https://github.com/arvid-berndtsson/rust-sorting-algorithms

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.0%) to scientific vocabulary

Keywords

algorithms performance performance-analysis performance-metrics performance-testing rust sorting sorting-algorithms
Last synced: 5 months ago · JSON representation

Repository

Comprehensive collection of sorting algorithms implemented in Rust, complete with performance testing and unit tests.

Basic Info
  • Host: GitHub
  • Owner: arvid-berndtsson
  • License: mit
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 29.3 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 5
  • Releases: 0
Topics
algorithms performance performance-analysis performance-metrics performance-testing rust sorting sorting-algorithms
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Rust Sorting Algorithms

This project involves the implementation of various sorting algorithms in Rust.

Table of Contents

Background

Sorting algorithms are an essential part of computer science. They are used to rearrange a sequence of elements in a specific order. There are many different sorting algorithms, each with its own strengths and weaknesses. Some sorting algorithms are more efficient than others, depending on the size of the input data and the distribution of the elements.

This project aims to implement a variety of sorting algorithms in Rust. Rust is a systems programming language that is known for its performance, safety, and concurrency features. By implementing sorting algorithms in Rust, we can learn more about the language and how it can be used to solve complex problems.

Algorithms Included

✅ = Working ❌ = Not working ⏰ = Not started

| Algorithm | Status | Type | Learn more | | -------------------- | ------ | -------------------- | -------------------------------------------------------------------------------- | | Bitonic sort | ❌ | | Link | | Block sort | ⏰ | Comparison sorts | Link | | Bogo sort | ✅ | | Link | | Bubble sort | ✅ | Comparison sorts | Link | | Burst sort | ⏰ | | Link | | Cocktail shaker sort | ✅ | Comparison sorts | Link | | Comb sort | ✅ | Comparison sorts | Link | | Counting sort | ✅ | | Link | | Cubesort | ⏰ | | Link | | Exchange sort | ⏰ | Comparison sorts | Link | | Cycle sort | ❌ | Comparison sorts | Link | | Flash sort | ⏰ | | Link | | Gnome sort | ✅ | Comparison sorts | Link | | Heap sort | ✅ | Comparison sorts | Link | | Introsort | ⏰ | Comparison sorts | Link | | In place merge sort | ⏰ | Comparison sorts | Link | | Tournament sort | ⏰ | Comparison sorts | Link | | Insertion sort | ✅ | Comparison sorts | Link | | Library sort | ❌ | Comparison sorts | Link | | Merge sort | ✅ | Comparison sorts | Link | | Pancake sort | ✅ | Comparison sorts | Link | | Patience sorting | ❌ | Comparison sorts | Link | | Postman sort | ⏰ | | Link | | Quick sort | ✅ | Comparison sorts | Link | | Radix sort | ✅ | | Link | | Red-Black Tree sort | ✅ | | Link | | Selection sort | ✅ | Comparison sorts | Link | | Shell sort | ✅ | Comparison sorts | Link | | Sleep sort | ✅ | | Link | | Smooth sort | ❌ | Comparison sorts | Link | | Stooge sort | ✅ | | Link | | Strand sort | ✅ | Comparison sorts | Link | | Tim sort | ✅ | Comparison sorts | Link | | Tree sort | ✅ | Comparison sorts | Link | | Odd-even sort | ⏰ | Comparison sorts | Link | | Pigeonhole sort | ⏰ | Non-comparison sorts | Link |

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Rust installed on your machine. If you don't have Rust installed, you can install it by following these steps:

  1. Download and install rustup by following the instructions at https://rustup.rs/.

  2. Once rustup is installed, open a new terminal and run the following command to install the Rust compiler:

bash rustup install stable

  1. Add the cargo binary to your PATH with the following command:

bash source $HOME/.cargo/env

Installing

  1. Clone the repository

bash git clone https://github.com/arvid-berndtsson/Rust-Sorting-Algorithms.git

  1. Navigate into the cloned repository

bash cd rust-sorting-algorithms

  1. Build the project

bash cargo build

Running

You can run the project with:

bash cargo run

Testing

You can run the tests with:

bash cargo test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contribute

If you would like to contribute to this project, please open an issue or a pull request. All contributions are welcome!

Disclaimer

This project is for educational purposes. I do not recommend using these sorting algorithms in production code. Rust has built-in sorting functions that are more efficient and reliable than the algorithms implemented in this project.

I made this project to learn more about Rust and sorting algorithms. I hope you find it useful and informative!

Owner

  • Name: Arvid Berndtsson
  • Login: arvid-berndtsson
  • Kind: user
  • Location: Sweden
  • Company: @LimeTip

Based in Malmö, Sweden, I specialize in software development and digital sustainability. Founder of @LimeTip and Co-Founder of @merely-emissions

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 6
  • Total pull requests: 2
  • Average time to close issues: about 14 hours
  • Average time to close pull requests: 3 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 2
  • Average time to close issues: about 14 hours
  • Average time to close pull requests: 3 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • arvid-berndtsson (5)
Pull Request Authors
  • arvid-berndtsson (3)
Top Labels
Issue Labels
bug (5)
Pull Request Labels

Dependencies

.github/workflows/rust.yml actions
  • actions/checkout v4 composite
Cargo.lock cargo
  • cfg-if 1.0.0
  • getrandom 0.2.14
  • libc 0.2.154
  • ppv-lite86 0.2.17
  • rand 0.8.5
  • rand_chacha 0.3.1
  • rand_core 0.6.4
  • wasi 0.11.0+wasi-snapshot-preview1
Cargo.toml cargo