0.3.0 • Published 2 years ago

typed-ds-algs v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm version code style: prettier

Typed-Ds-Algs

Data Structures in TypeScript!

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
6.4.1
v8.16.0

Table of contents

Installation

BEFORE YOU INSTALL: please read the prerequisites

To install and set up the library, run:

$ npm install -S typed-ds-algs

Or if you prefer using Yarn:

$ yarn add --dev typed-ds-algs

Data Structures

Stack

MethodParametersReturn Type
isEmptyN/Aboolean
isFullN/Aboolean
pushitem : Tvoid
popN/AT
peekN/AT
getStackN/AT[]
const stack = new Stack<number>();
stack.push(3);
stack.push(2);
stack.pop();

const top = stack.peek();

Queue

MethodParametersReturn Type
isEmptyN/Aboolean
isFullN/Aboolean
enqueueitem : Tvoid
dequeueN/AT
peekN/AT
getQueueN/AT[]

Example:

const queue = new Queue<number>();
queue.enqueue(3);
queue.enqueue(2);
queue.dequeue();

const front = queue.peek();

BinarySearchTree

TypeDefault value
string''

Example:

BlockChain

TypeDefault value
string''

Example:

Contributing

Please read CONTRIBUTING.md for the process for submitting pull requests.

  1. Fork it!
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request!

Built With

  • TypeScript
  • Love

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See the list of contributors who participated in this project.

License

MIT License © Connor Pawar