This repository contains a visualization code of the Distribution Counting Sort algorithm using Manim, a mathematical animation engine. The implementation is provided by Ashraf Hany as part of the Design and Analysis of Algorithms course CS312 a total of 78 Hours were spent to develop this video.
Distribution Counting Sort is a sorting algorithm that works efficiently for integers with a limited range. It operates by counting the occurrences of each element and then determining the correct position for each element in the sorted array based on these counts.
Watch The Video Here.
Distribution Counting Sort is a sorting algorithm designed for integers with a limited range. It employs a counting-based approach to efficiently organize elements in ascending order. This animattion was made for a course project using Manim and Adobe Premiere Pro to insert the music you hear.
To set up the required environment, follow these steps:
-
Install Manim by running the following command:
pip install manim
Make sure you've installed all of Manim required dependencies like LaTeX
-
Clone this repository:
git clone https://github.com/AshrafHanyy/Distrubtion_Count_Sort
-
Navigate to the project directory:
cd YourPath/Distrubtion_Count_Sort -
Run the Manim animation script:
manim -pqh sort.py DistributionCountingSort
The Manim animation visually demonstrates the Distribution Counting Sort algorithm:
Array Initialization: Starts with a visual representation of the unsorted array. 📤
Frequency and Distribution Arrays: Illustrates the creation of frequency and distribution arrays, providing insights into the counts of each element. 📈
Sorting Process: Shows the step-by-step sorting process, determining the correct positions based on element occurrences. 🔍
Informative Text: Includes informative text to enhance understanding, guiding through the algorithm's key steps. 📝
The animation includes informative text, visualizing the step-by-step process of the algorithm, and highlighting key elements for better understanding.

