Dear fellow programmers,
Excellent - a whole New Year to spend on silly programming
challenges! What's this, I hear you say? You've run out of daft
crackpot problems and you need to get back to your real work!
Already?!?
Perhaps you have time for just one potty little problem? An easy
one. No honest. This one's *really* easy. Unless you want style
points ...
--- Steve's Very Silly Pop-11 Programming Challenge 2003 ---
Implement a PERMUTATION REPEATER. Given a data structure of your
choice (string, list, vector, all of the previous), return a
procedure that when called repeatedly returns permutations of the
original. Although the order of the permutations returned there
should be no repeats and every possible permutation should be
returned, eventually.
Points will be awarded by me for
1. Correctness, because this is not a C programming challenge.
2. Beauty.
3. Efficiency - in both time and space.
4. Generality. Super bonus points for handling dynamic lists.
5. Showing off, rule bending, cheating, etc.
Post your solutions to popforum _or_, if you don't want to share you
cunning plan with your rivals, email them direct to me. I do
solemnly promise not to steal your ideas for my own answer. Well,
not before announcing any results, anyway. The scoring system will
be announced after I have seen the entries and decided on the winner.
Lastly, rival judgements to my own are naturally welcome.
--
Steve
|