To further muddy the water. With other test data I find that the result with the above code is not quite as desired, as I initially expected (thus the plea for help). While it returns a legal result, its far from optimum. For instance:
&pseudoKnotPairs(qw/0 100 1 99 10 88 11 99/);
Will remove the first 3 pairs. All that would be necessary is to remove one of 10/88 or 11/99 and all three remain pairs would pass the mystical "nested" test.
In reply to Re^3: (non) nested pairs
by xipho
in thread (non) nested pairs
by xipho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |