bintree
Simple search tree Class implementation, in JavaScript. Add, Search, Remove and many more.
Last updated 3 years ago by nekgasov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bintree 
SYNC missed versions from official npm registry.

Binary tree

What?

Simple implementation of binary tree Class.

Why?

I wanted to create a clean implementation of Binary Tree using Javascript.

What it can do?

This implementation supports:

add - adding items

remove - deleting items

find - searching

contains - checking if element exists

traverse - going through the tree with callback

size - checking count of nodes

toArray - converting to array

toString - converting to string

Starting

npm i

Memory usage

For data sets like numbers, strings, objects, binary tree size in memory grows 20-50%.

The usage was significantly optimized in v0.2.0 (125-200%).

Unit tests

Run npm test for single test, or npm run test-w with watch.

License

MIT

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

3 Versions

  • 1.0.0                                ...           3 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |