in reply to (Golf) FLAMES

In your step 4 example to remove letters from FLAMES you first remove L then F then S then suddenly you have FAM left when it should be AME because you already took the F but not the E. Shouldn't you wind up with just E at the end rather than M. Throwing a print statement into your code shows it also arriving at M through a different (also incorrect) series of removals.

Replies are listed 'Best First'.
Re: Re: (Golf) FLAMES
by larryk (Friar) on Aug 30, 2001 at 19:42 UTC
    You are absolutely correct. Apologies for such shoddy work. I have fixed the spec, my code and the test cases.
       larryk                                          
    perl -le "s,,reverse killer,e,y,rifle,lycra,,print"