Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nem035/csjs
Small collection of basic CS Algorithms/Data Structures in JavaScript.
https://github.com/nem035/csjs
algorithm computer-science-algorithms javascript
Last synced: 3 days ago
JSON representation
Small collection of basic CS Algorithms/Data Structures in JavaScript.
- Host: GitHub
- URL: https://github.com/nem035/csjs
- Owner: nem035
- License: mit
- Created: 2016-10-02T08:26:56.000Z (over 8 years ago)
- Default Branch: gh-pages
- Last Pushed: 2018-12-28T04:02:51.000Z (about 6 years ago)
- Last Synced: 2024-12-16T04:42:00.635Z (about 2 months ago)
- Topics: algorithm, computer-science-algorithms, javascript
- Language: JavaScript
- Homepage: https://nem035.github.io/csjs
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Computer Science in JavaScript
Small collection of basic CS Algorithms/Data Structures in JavaScript.
[Live Demos](https://nem035.github.io/csjs/)
This project started out by me wanting to play around with [CSS variables](https://github.com/nem035/csjs/blob/gh-pages/css/style.css#L5) but then I just went bananas and wrote some algorithms.
If you're interested in these topics, definitely checkout the [much better version](https://github.com/nzakas/computer-science-in-javascript/) of this project.
Equally recommended is the awesome [Algorithm Visualizer](http://algorithm-visualizer.org).
## Algorithm Implementation/Optimization Hints
- 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)## Generic Optimization Hints
- Make sure not to (unnecessarily) revisit already visited data.
## Libraries used
- [Ace](https://github.com/ajaxorg/ace)
- [jQuery](https://github.com/jquery/jquery)