Did you notice a pattern in the table you pasted? It looks like it contains all the information you need. It's basically like this:
If $x%3 is 0, the arrays should all be of size $x/3. If $x%3 is not 0, there should be $x-($x%3) arrays of size $x/3 and $x%3 of size $x/3+1.
I'm not positive this will continue to hold true, but it looks good from what you've shown. There may be a simpler algorithm too, so I would be happy to see other replies. :-)
In reply to Re: breaking an array into nearly equal parts
by revdiablo
in thread breaking an array into nearly equal parts
by santonegro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |