ss-tree
Data Structure Serial - Tree
- written in Typescript
- fully tested
Installation
Node.js / Browserify
npm install ss-tree --save
var Tree TreeNode = ;
Global object
Include the pre-built 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.