Hello suppose you have ordinary unix path tree as input (as string).
root 0
root/file1.txt 1
root/file2.txt 2
root/folder1 3
root/folder1/file3.txt 4
root/folder1/file4.txt 5
e.t.c.
What is the better way to convert this string to tree data structure?
Now i use simple tree representation, created by myself
I don’t really understand Gir’s algorithm (posted above). But i suppose the solution must be the following:
For me this algorithm seems to be really complicated. I don’t understand algorithm, posted above, maybe it is possible to clarify this question? Maybe the structure i use to store the tree isn’t the best one?