1.0.5 • Published 5 years ago

ss-tree v1.0.5

Weekly downloads
20
License
-
Repository
github
Last release
5 years ago

ss-tree

Build Status Coverage Status MIT Licence npm version

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.