A visual representation of the Selection Sort algorithm implemented in C.
- Sorting Visualization: Visual representation of the Selection Sort algorithm steps.
- Color-coded Elements: Differentiates selected elements, current comparisons, and sorted elements.
- Console-based Animation: Uses ANSI escape codes to animate sorting steps in the console.
-
Clone the repository:
git clone https://github.com/AyushHL/Selection-Sort-Animation.git
-
Compile the code:
cd Selection-Sort-Animation gcc -o selection_sort SelectionSortAnimation.c -
Run the animation:
./selection_sort
The animation will demonstrate the Selection Sort algorithm on a predefined array.
- Watch the console output to observe each step of the Selection Sort algorithm.
- Elements are color-coded (red for selected element, green for sorted element) to visualize the sorting process.
- The animation will demonstrate how Selection Sort arranges elements in ascending order.
- SelectionSortAnimation.c: Contains the main logic for the Selection Sort algorithm and console animation.
- README.md: This file providing information about the project.
- C Programming Language
- ANSI Escape Codes for console manipulation
Contributions are welcome!
If you have any ideas, improvements, or bug fixes, feel free to open an issue or submit a pull request.