- 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 Answer
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