Javascript – Trouble with parsing a string into a tree in JS
This code converts string into an array tree, but does so with a bug - // I have this input const input = "(1 (2 (4 5 6 (7) 108 (9)) 3))"; // and this function class TreeNode { constructor(value)…