https://github.com/atilafassina/fundamentals
🎓Computer Science fundamentals in JavaScript.
https://github.com/atilafassina/fundamentals
algorithms computer-science-algorithms study-project
Last synced: about 1 year ago
JSON representation
🎓Computer Science fundamentals in JavaScript.
- Host: GitHub
- URL: https://github.com/atilafassina/fundamentals
- Owner: atilafassina
- License: mit
- Created: 2018-09-18T07:36:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T16:19:20.000Z (over 3 years ago)
- Last Synced: 2025-04-03T12:54:38.490Z (about 1 year ago)
- Topics: algorithms, computer-science-algorithms, study-project
- Language: JavaScript
- Homepage:
- Size: 476 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
⭐ 🏈 🦄 🏀 🤘 🏉 ✨
FUNdamentals
Computer Science fundamentals in JavaScript.
Check below for recommended use-cases on each of them and relevant tradeoffs.
## Algorithms
### Binary Search
Requires a sorted `array` for it to work. Essentially a Binary Search break the array into 2 halves and check in which half range the target value may be. It's quite powerful for large data sets as it can avoid iterations, one can (should) perform a Binary Search knowing only two things: that the provided `array` is sorted (1), and the length of the given `array`(2).
[Implementation](https://github.com/atilafassina/fundamentals/tree/master/src/binarySearch)
### Insertion Sort
It‘s a simple to implement sort algorithm, not very efficient for large data sets, but quite efficiente and powerful for small ones. It can avoid confusion by not changing the order of equal set of keys. In a nutshell, Insertion Sort iterates twice through the `array`. First iteration corresponds to the target position, whilst second iteration is for comparison with future elements. Every time the current item is smaller than the comparison value, it is inserted in the current position and first iteration moves forward.
[Implementation](https://github.com/atilafassina/fundamentals/tree/master/src/insertionSort)
---
Heavily inspired on [Algorithms.JS](http://felipernb.github.io/algorithms.js/) by Felipe Ribeiro.