/coffeeDS

DataStructure in coffeescript

Primary LanguageJavaScript

CoffeeDS Build Status Coverage Status

Basic Datastructure in CoffeeScripts.

Unit tested against the awesome buckets lib.

Structure covered so far:

Incoming

  • red black trees & AVL
  • stack
  • heap
  • hashMap
  • and other stuff like sorts, generic search (A* etc)

Why ?

No specific reasons, I'm just having some fun rediscovering all that things and thought it could be fun to share with people.

Getting started

The repo makes uses of:

Don't forget to npm install upon cloning

Usage Example

# main.coffee
BSTree = require('./BSTree')

tree = new BSTree()
tree.add [100, 42, 45, 70, 120, 48]
console.log tree.size(), tree.height()
$ git clone http://github.com/beNjiox/coffeeDS
$ cd coffeeDS && npm install
$ gulp tests
$ gulp cover && open ./coverage/lcov-report/index.html