in reply to Re^3: Spreading out the elements
in thread Spreading out the elements
[...] given that "BAB is also acceptable" decided that you might prefer the most diffuse spread possible regardless of whether that meant starting with an 'a' or a 'b'. |
My fault; I should have made it clear that it was an edge case. However... even with the changes you've suggested, I get this:
print interleave(4, 5); ababbbaba print interleave(4, 7); ababbbbbaba
This should be more like
This version provides the maximum distance possible between all 'a's.print interleave(4, 5); abbabbaba print interleave(4, 7); abbbabbabba
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Spreading out the elements
by BrowserUk (Patriarch) on Jul 05, 2007 at 06:47 UTC | |
by oko1 (Deacon) on Jul 05, 2007 at 16:30 UTC |