Skip to content

Commit b51fc42

Browse files
feat: upgrade sorting visualizer to support bubble, selection, insertion, and quick sort
1 parent a7ee1f3 commit b51fc42

5 files changed

Lines changed: 613 additions & 414 deletions

File tree

projects_registry.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,16 +438,19 @@
438438
"path": "math/Binary-Search/Binary-Search.py"
439439
},
440440
{
441-
"name": "Bubble Sort Visualizer",
441+
"name": "Multi-Algorithm Sorting Visualizer",
442442
"emoji": "🫧",
443443
"category": "math",
444444
"difficulty": "intermediate",
445-
"description": "Watch the bubble sort algorithm sort a list of numbers step-by-step.",
445+
"description": "Visualize Bubble Sort, Selection Sort, Insertion Sort, and Quick Sort step-by-step.",
446446
"keywords": [
447-
"bubble",
447+
"sorting",
448448
"sort",
449449
"visualizer",
450450
"algorithm",
451+
"selection",
452+
"insertion",
453+
"quick",
451454
"math"
452455
],
453456
"path": "math/Bubble-Sort/Bubble-Sort.py"
@@ -684,6 +687,8 @@
684687
"ai"
685688
],
686689
"path": "games/Pygame-Chess/main.py"
690+
},
691+
{
687692
"name": "2048 Game",
688693
"emoji": "🔢",
689694
"category": "games",

web-app/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ <h3>Legal</h3>
898898
<script defer src="js/projects/progress-tracker.js"></script>
899899
<script defer src="js/projects/number-guessing.js"></script>
900900
<script defer src="js/projects/binary-search.js"></script>
901-
<script defer src="js/projects/bubble-sort.js"></script>
901+
<script defer src="js/projects/sorting-visualizer.js"></script>
902902
<script defer src="js/projects/quick-sort.js"></script>
903903
<script defer src="js/projects/merge-sort.js"></script>
904904
<script defer src="js/projects/hangman.js"></script>
@@ -1104,11 +1104,11 @@ <h3>Legal</h3>
11041104
tags: "math,algorithm",
11051105
},
11061106
{
1107-
project: "bubble-sort",
1108-
title: "Bubble Sort",
1107+
project: "sorting-visualizer",
1108+
title: "Sorting Visualizer",
11091109
category: "math",
1110-
desc: "Visualize bubble sort algorithm",
1111-
tags: "math,algorithm",
1110+
desc: "Visualize multi-algorithm sorting (Bubble, Selection, Insertion, Quick)",
1111+
tags: "math,algorithm,sorting",
11121112
},
11131113
{
11141114
project: "quick-sort",

web-app/js/projects.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function getProjectHTML(projectName) {
2929
'reverse-hangman': () => getReverseHangmanHTML(),
3030
'budget-tracker': getBudgetTrackerHTML(),
3131
'snake-game': getSnakeGameHTML(),
32-
'bubble-sort': getBubbleSortHTML(),
32+
'sorting-visualizer': getSortingVisualizerHTML(),
3333
'quick-sort': getQuickSortHTML(),
3434
'fourier-series': getFourierSeriesHTML(),
3535
'merge-sort': getMergeSortHTML(),
@@ -1674,11 +1674,12 @@ const projectInstructions = {
16741674
"Cuts search space in half each step"
16751675
]
16761676
},
1677-
"bubble-sort": {
1678-
title: "🔄 How Bubble Sort Works",
1677+
"sorting-visualizer": {
1678+
title: "📊 How Sorting Visualizer Works",
16791679
steps: [
1680-
"Enter an array of numbers",
1681-
"Watch the sorting visualization"
1680+
"Select your preferred sorting algorithm",
1681+
"Adjust array size and visualization speed",
1682+
"Watch comparing, swapping, and sorted states in real-time"
16821683
]
16831684
},
16841685
"quick-sort": {
@@ -3030,7 +3031,7 @@ function initializeProject(projectName) {
30303031
"emoji-memory": "initEmojiMemoryGame",
30313032
fibonacci: "initFibonacci",
30323033
"binary-search": "initBinarySearch",
3033-
"bubble-sort": "initBubbleSort",
3034+
"sorting-visualizer": "initSortingVisualizer",
30343035
"quick-sort": "initQuickSort",
30353036
"merge-sort": "initMergeSort",
30363037
"progression-recognizer": "initProgressionRecognizer",

0 commit comments

Comments
 (0)