- 1

How to implement tree data structure in javascript simply

Implementation of tree ds in javascript

2nd Nov 2021, 6:46 AM
Jayalekshmi R
1 Resposta
0
Don't you consider a simple object as tree? var tree = { a: "leaf", b: { c:"leaf" }}}. The root has two nodes a and b. The node a is a leaf. And node b is a subtree.
30th Mar 2022, 1:54 AM
Дмитрий Золотов
Дмитрий Золотов - avatar