binary-tree-printer

0.0.3 • Public • Published

Install

npm install --save binary-tree-printer

Usage

const tree_1 = require("binary-tree-printer");
 
const t = {
  "value": 1,
  "left": {
    "value": 2,
    "left": null,
    "right": null
  },
  "right": {
    "value": 3,
    "left": null,
    "right": null
  }
}
 
console.log(tree_1.printAsciiTree(t));
 
/**
    1
   / \
  /   \
 /     \
2       3
 
*/

Readme

Keywords

none

Package Sidebar

Install

npm i binary-tree-printer

Weekly Downloads

2

Version

0.0.3

License

ISC

Unpacked Size

6.04 kB

Total Files

3

Last publish

Collaborators

  • yyf1994