This project provides a visualization tool for various sorting algorithms. Users can see how different sorting algorithms work step by step using interactive graphics.
- Interactive Visualization: The project will provide step-by-step visualizations of sorting algorithms.
- Supported Algorithms: The tool will include Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, and Quick Sort.
- User-Friendly Interface: Users can easily select sorting algorithms and navigate through visualization steps.
- Clear Animations: Visual animations will clearly demonstrate how data is manipulated during sorting.
- Platform: The project will be implemented in C using the SDL library for graphics.
The project is organized into several key components:
- Source Code: The C source code files are organized for each sorting algorithm, making it easy to understand and maintain.
- Headers: The
headers
directory contains header files corresponding to the source code files, ensuring modularity and separation of concerns. - Graphics: SDL graphics are used to create interactive animations that display each sorting algorithm's progress.
- User Input: The tool will prompt users to select a sorting algorithm and provide guidance on using the visualization.
-SDL2 should be installed on your system
ARCH
sudo pacman -Syu sdl2
UBUNTU
sudo apt-get update
sudo apt-get install libsdl2-dev
CENTOS
sudo yum install SDL2-devel
-
Clone the repository:
git clone https://github.com/itsdhruvarora/chromasort.git cd sorting-algorithms-visualization
-
Compile the Project
Compile the necessary files to create the visualization tool.
gcc -o visualizer main.c -lSDL2 -L. -lvis
- Run the Program Run the compiled program to interact with the visualization.
./visualizer
- Upon running the program, you'll be presented with an introductory screen and a list of available sorting algorithms.
- Choose a sorting algorithm by entering its corresponding number.
- The visualization will start, showing each step of the sorting process graphically.
- Follow the on-screen instructions to navigate through the visualization.
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature/your-feature-name
. - Open a pull request to the
main
branch of this repository.
This project is licensed under the MIT License - see the LICENSE file for details.