This repository written in JavaScript is a compilation of the most-known data structures and algorithms.
It's usual to see data structures and algorithms taught in Java. However, getting a Java development environment might be troublesome, whereas JavaScript can be run with no more than a few steps.
JavaScript is also a flexible language that allows performing actions that could save time and helps explain a concept. If you want to transpile this knowledge to any other language, it might be easier for you after understanding what's presented here.
Read all the content of Data Structures and Algorithms here
You will need to have node installed. I recommend using the nvm installer script, and following their instructions. I recommend using the v20.12.2
version.
git clone git@github.com:mesirendon/datastructures-and-algorithms-js.git
npm ci
Running all tests will show a coverage report.
npm t
npm run test:case src/singly-linked-lists/__test__/linked-lists.spec.js
You can use the provided index.js as a playground by running in a console the following command.
npm start
When you modify the index.js file and save it, the service will be reloaded.
This repository is meant to be used as an educational and research tool. Therefore, you should think twice before copying and pasting the code seen here in your production developments. Also, remember this code is licensed under MIT License, thus limiting any warranty or liability for its use.
Trekhleb's JavaScript Algorithms repository heavily inspires this repository.