2 comments

[ 4.8 ms ] story [ 20.0 ms ] thread
Wow that's a lot of steps to rank 11 things, just doing your example. I C-w'd before the end. Seems like there'd be a better algorithm than like 121 head-to-head matches.
For the 10 examples it's 45 head-to-head matches, but it's roughly accurate by about halfway through depending on how benign the random number generator is feeling. You need all of them for it to be accurate, you can test that by always picking in alphabetical order.

I haven't given much thought to how to do it more efficiently, but you're probably right that there is a more optimal way to do it, and if anyone can think of one I'm all ears!