by Nils Hansander (2022)
The purpose of this project has simply been for me to practise implementing various sorting and search algorithms, to make me improve as a developer and to work as a showcase of a variety of algorithms.
The algorithm implementations are provided as-is, with no purport as to being the most effective, scalable solutions. Some unit testing has been implemented, but I can leave no guarantee to the code being safe or behave predictably in every possible scenario. If you use the code in this repository, you do so at your own risk. See also LICENCE.md in this repository.
This package is built with Typescript to be used in a Node.Js environment. Make sure you have Node.Js and Typescript installed before running the commands below.
- Clone this project to your system and open up a terminal to the root directory of the project.
- Run
npm cito install the project and its dependencies.
- Run
npm run buildto compile the typescript source files in the src directory, and then run unit tests. - Run
npm run testto run unit tests only. - Run
npm run demoto see the algorithms in action using example data.
The following package entry points are available for imports:
"cs-algorithms" // General entry point
"cs-algorithms/graphs" // Graph algorithms
"cs-algorithms/sorting" // Sorting algorithms