@pencroff/ts-algorithms

Typescript algorithms and Data Structures

Usage no npm install needed!

<script type="module">
  import pencroffTsAlgorithms from 'https://cdn.skypack.dev/@pencroff/ts-algorithms';
</script>

README

ts-algorithms

Typescript algorithms and Data Structures

Build Status codecov

Get started

npm i @pencroff/ts-algorithms --save

The package doesn't provide any common exports. All required imports should be per item. For example:

import { genericComparator } from '@pencroff/ts-algorithms/dist/primitive/comparator'

const res = genericComparator('A', 'B'); // returns -1, check primitives for details

Algorithms

Theory

Big O notation is used in computer science to describe the performance or complexity of an algorithm.

Big O chart source: www.bigocheatsheet.com

Big O can be used for measuring time complexity or space / memory complexity.

References: