UNPKG
simple-binary-tree
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
Binary tree data structure
simple-binary-tree
/
dist
/
index.js
9 lines
(8 loc)
•
163 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import { Node }
from
'./node/index.js'
;
let
root =
new
Node(
5
); root.
add
(
3
); root.
add
(
8
); root.
add
(
1
); root.
add
(
4
); console.log(root); console.log(root.length());