ss-tree
v1.0.5
Published
[![Build Status](https://travis-ci.org/boycgit/ss-tree.svg?branch=master)](https://travis-ci.org/boycgit/ss-tree) [![Coverage Status](https://coveralls.io/repos/github/boycgit/ss-tree/badge.svg?branch=master)](https://coveralls.io/github/boycgit/ss-tree?b
Downloads
14
Readme
ss-tree
Data Structure Serial - Tree
- written in Typescript
- fully tested
Installation
Node.js / Browserify
npm install ss-tree --save
var {Tree, TreeNode} = require('ss-tree');
Global object
Include the pre-built script.
<script src="./dist/index.umd.min.js"></script>
Build & test
npm run build
npm test
document
主要注意:
- 空树(tree.root = null) 和 根节点为空 (tree.root = new TreeNode()) 的差别;
- 节点的
data
概念和value
是不同的,data
是节点最原始的数据,而value
则是data
属性的映射之后的数值 - 为 BST 能够高效运转,应当让所有数据去重后再存储
npm run doc
then open the generated out/index.html
file in your browser.
License
MIT.