Give us a context and explain how this is a Perl problem. At present it looks like an algorithm that you are struggling with independent of implementation. When you turn it into an implementation issue using Perl we are likely to be more use to you.
If it's just the algorithm you are having trouble with, at least mark the question off topic (put [OT] at the start of the title.
In reply to Re: Formalizing an array type problem, looking for solution
by GrandFather
in thread Formalizing an array type problem, looking for solution
by melmoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |