in reply to Convert delimited string into nested data structure
After popping to the right level, and BEFORE pushing the current node, insert information from the current node into the array owned by the current stack top.
Your nodes are ok, except that I would add level to name and children. Also, add a dummy root node at level 0.
Phil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Convert delimited string into nested data structure
by Anonymous Monk on Feb 19, 2007 at 18:56 UTC | |
by philcrow (Priest) on Feb 19, 2007 at 19:07 UTC | |
by Anonymous Monk on Feb 19, 2007 at 19:16 UTC | |
by Anonymous Monk on Feb 19, 2007 at 19:19 UTC | |
by philcrow (Priest) on Feb 19, 2007 at 19:26 UTC |