At the entrance I have a json data array. Each element has id(string, not null), folder(bool), parentId(string)
Based on this data, I have to create a file directory (or else as it is called "tree"). The analogy is - the file system in windows explorer (I think, like in most OS). I know how to create tree, node, leaf classes and the structure is less understood. The problem is in the algorithm that scatters the entire array into this structure. Can you tell me how to implement this or what algorithm?