β Problem Statement
Currently, the project includes Bubble Sort and Quick Sort
visualizers for teaching/demonstrating sorting algorithms.
Merge Sort is another fundamental algorithm that uses a
divide-and-conquer approach, but there's no interactive way
for users to visualize how it works within this project.
π Proposed Enhancement
Add a Merge Sort Visualizer project following the same
UI/UX pattern as the existing Bubble Sort and Quick Sort
Visualizers, so users can interactively see how Merge Sort
divides an array into halves and merges them back in sorted
order step by step.
π οΈ Suggested Implementation
- Reuse the existing UI structure (input field, speed slider,
animated bar chart, stats row, result display)
- Visualize the dividing phase (splitting array into halves)
- Visualize the merging phase (combining two sorted halves
back together)
- Use different colors for: Dividing / Merging / Sorted
- Track and display comparisons and merge operations count,
similar to Bubble Sort and Quick Sort Visualizers
- Add a new file
web-app/js/projects/merge-sort.js with:
getMergeSortHTML() β UI template
initMergeSort() β sorting logic + animation
- Register the new project in
web-app/js/projects.js:
- Add to
getProjectHTML() map
- Add to
initializers map
- Add
math/Merge-Sort/Merge-Sort.py CLI version following
the Bubble-Sort.py / Quick-Sort.py pattern
- Add
tests/test_merge_sort.py with unit tests
β Problem Statement
Currently, the project includes Bubble Sort and Quick Sort
visualizers for teaching/demonstrating sorting algorithms.
Merge Sort is another fundamental algorithm that uses a
divide-and-conquer approach, but there's no interactive way
for users to visualize how it works within this project.
π Proposed Enhancement
Add a Merge Sort Visualizer project following the same
UI/UX pattern as the existing Bubble Sort and Quick Sort
Visualizers, so users can interactively see how Merge Sort
divides an array into halves and merges them back in sorted
order step by step.
π οΈ Suggested Implementation
animated bar chart, stats row, result display)
back together)
similar to Bubble Sort and Quick Sort Visualizers
web-app/js/projects/merge-sort.jswith:getMergeSortHTML()β UI templateinitMergeSort()β sorting logic + animationweb-app/js/projects.js:getProjectHTML()mapinitializersmapmath/Merge-Sort/Merge-Sort.pyCLI version followingthe
Bubble-Sort.py/Quick-Sort.pypatterntests/test_merge_sort.pywith unit tests