My version! [0]
- More functional, with iterators and stuff. (It's half-baked, though, so please take it further!)
- Handles small numbers of candidates correctly.
- Agrees with the table on Wikipedia [1], and with the 1/e limit.
- Calculates hiring frequency for all candidates, not just the best one.
- Faster!
[0] https://gist.github.com/anonymous/9d735c5c77bd2e0939c69f5dd4...
[1] https://en.wikipedia.org/wiki/Secretary_problem#Deriving_the...