Basic Datastructure in CoffeeScripts.
Unit tested against the awesome buckets lib.
- red black trees & AVL
- stack
- heap
- hashMap
- and other stuff like sorts, generic search (A* etc)
No specific reasons, I'm just having some fun rediscovering all that things and thought it could be fun to share with people.
The repo makes uses of:
Don't forget to npm install upon cloning
# 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