"Secret Santas" in Haskell / better data structure?

23 Dec
2006
23 Dec
'06
5:31 a.m.
Cafe Crew -- I posted my simple-but-slow solution to Ruby Quiz problem #2: http://mult.ifario.us/articles/2006/12/22/secret-santas-in-haskell-iii-colle... (Or http://tinyurl.com/y3l2re if your mail client messes up the URL...) It's more than practically fast enough unless you have, say 10^8 friends to do secret Santa with, but the problem just cries out for a well-chosen data structure. (One obvious improvement over the approach I posted is to sort the list first, but maybe there's something even better...) As I'm learning, critiques of syntax and usage welcome. I'll collect the source and post to the Haskell Quiz wiki as well. -- Paul
6725
Age (days ago)
6725
Last active (days ago)
0 comments
1 participants
participants (1)
-
Paul Brown