[33/N] Add unit tests for LSDRadix, RadixSort, BogoSort, DropSort, FredSort, MiracleSort, and SleepSort algorithms - #124
Open
karkir0003 wants to merge 33 commits into
Conversation
…de, and AnimatedCircularlyLinkedListNode
…ttern matching algorithms
…Sort, MergeSort, Quicksort, Quickselect, and HeapSort algorithms
… MiracleSort, and SleepSort algorithms
This was referenced Oct 3, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack
Addresses #93
Context
Adds comprehensive unit test coverage for non-comparison and esoteric/joke sorting algorithms:
LSDRadix.js: Least Significant Digit (LSD) Radix Sort with 10 buckets for positive numbers, 19 buckets (-9 to +9) for negative numbers, digit extraction passes, and negative sorting toggle (toggleNegativeNumbers).RadixSort.js: Classical 3-digit Radix Sort with fixed 30-element visual layout, 10 counting-sort buckets, prefix sum calculation, and swap array copying passes.BogoSort.js: Random permutation shuffling sort with sorted verification pass, duplicate element distinguishing letters, and safety abort warning for arrays >= 10 elements.DropSort.js: Humorously destructive sort that iterates through array comparing adjacent elements and drops (deletes) any element smaller than its predecessor, shifting subsequent elements left.FredSort.js: Partitioned sorting dividing array intoceil(sqrt(n))sub-arrays, performing insertion sort on each partition, and merging.MiracleSort.js: Satirical miracle sort visualizer that displays the array in light blue and waits indefinitely for cosmic rays to sort the data.SleepSort.js: Concurrency-inspired sleep sort creating timer labels above each number, counting down to zero, and placing elements into a secondary destination array in ascending order of wakeup.Changes Made
src/algo/__tests__/LSDRadix.test.js:negative,data).src/algo/__tests__/RadixSort.test.js:radixSortCallback).sizeChanged), and UI enable/disable.src/algo/__tests__/BogoSort.test.js:src/algo/__tests__/DropSort.test.js:data), presets, and UI controls.src/algo/__tests__/FredSort.test.js:sqrt(n)chunks, sub-array drawing, insertion sort passes, and merging.src/algo/__tests__/MiracleSort.test.js:src/algo/__tests__/SleepSort.test.js:Test Plan
npm test -- --watchAll=false(all 7 new test suites pass, 66 unit tests passing; 75 suites, 831 tests passing repository-wide).npm run lintandnpm run prettier(0 errors, 0 warnings).