Small collection of basic CS Algorithms/Data Structures in JavaScript.
This project started out by me wanting to play around with CSS variables but then I just went bananas and wrote some algorithms.
If you're interested in these topics, definitely checkout the much better version of this project.
Equally recommended is the awesome Algorithm Visualizer.
- BubbleSort (
do/while
, no need to go past the last swapped element) - InsertionSort (we can stop searching as soon as we find insertion point)
- MergeSort (we can merge left and right subarrays in-place)
- QuickSort (we can set the pivot as the median of the first, middle and last element)
- Make sure not to (unnecessarily) revisit already visited data.