Skip to content

LowPolyCat1/sorting-algorithm-rs

Repository files navigation

Sorting Algorithm Visualizer

License   Contributors   Crate Versions   minifb   rodio

This project visualizes various sorting algorithms using a graphical interface and audio feedback. Users can interactively see sorting steps for educational purposes.

Built With

  • minifb crate - Window/context for rendering frames
  • rodio crate - Audio playback for visualization feedback
  • Pure Rust - All sorting algorithms written natively without external dependencies

Getting Started

Prerequisites

  • Rust toolchain (>=1.36.0)
  • Cargo package manager
  • Ensure audio device works (for sound visualization)

Installation

  1. Clone the repository

    git clone https://github.com/lowpolycat1/sorting-algorithm-rs.git
    cd sorting-algorithm-rs
  2. Install dependencies (should be handled by Cargo)

    cargo build
  3. Run the program

    cargo run

Usage

The visualizer allows selecting from:

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Merge Sort
  5. Quick Sort

Sound Effects: Enable/disable audio feedback during sorting animations.

Bar Selection: Configure number of bars (50-400 pixels) to fit your screen resolution.

Images

Bubble Sort

Bubble Sort

Selection Sort

Selection Sort

Insertion Sort

Insertion Sort

Merge Sort

Merge Sort

Quick Sort

Quick Sort

Finished Sorting

Finished Sorting

About

A Sorting Algorithm Visualizer written in Rust using minifb

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published