What I need to do is turn it into something like:my $data_struct = [ 'D', [ 'C', [ 'D', [ 'C', [ 'D', 'E' ], 'E', [ 'B' ] ], 'E', [ 'B', [ 'C' ] ] ], 'E', [ 'B', [ 'C', [ 'D', 'E' ] ] ] ], 'E', [ 'B', [ 'C', [ 'D', [ 'C', 'E' ], 'E', [ 'B' ] ] ] ], 'B', [ 'C', [ 'D', [ 'C', [ 'D', 'E' ], 'E', [ 'B' ] ], 'E', [ 'B', [ 'C' ] ] ] ] ];
I've banged my head on this for a while, any input/hints would be greatly appreciated.my $flattened = [ [D, C, D, C, D], [D, C, D, C, E], [D, C, D, E, B], [D, C, E, B, C], etc.. ]
In reply to A maybe(?) interesting comp-sci type problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |