Keith C. Ivey ([EMAIL PROTECTED]) wrote:
> [EMAIL PROTECTED] wrote:
> 
> > I was about to have a nice relaxing Sunday night, when I noticed
> > Keith and `/anick had shot ahead of me.
> 
> I noticed you were trying to creep up on me again, but I was 
> saved by the bell.  I had some hope of catching Stephen Turner 
> for a while (he was at 73), but then he suddenly raced ahead to 
> 63, beyond the reach of us mere mortals.
> 
> Here's a solution that I was playing with that had an 
> interesting way of counting the anagrams in a set:
> 
> ++substr($%{join _,sort/./g}.=b.$_,0,1)for sort<>;s/.//,s/
> ../ /g&&print for sort%%

I think this would have been rejected too, because it doesn't work for
anagram sets larger than 90 words.

Reading the excellent (thanks Ton) post-mortem of the human sort (or
even taking part in it) was very beneficial for this hole, because the
problem was remarkably similar with regard to the ordering of anagram
sets by the number of words in them[0].  There are many different
approaches.  In the human sort hole, the (1e9+n).$s approach was
optimal, however in this hole it became clear that the loop-based
equivalent of (1x n).$s which was best, unless your name was Lars.

Adam

[0] This is perhaps some of the first evidence which suggests that the
    "there are a finite number of golf holes" hypothesis is true.

Reply via email to