In article <[EMAIL PROTECTED]>,
        Phil Carmody <[EMAIL PROTECTED]> writes:

> 2) In 2 days time, I'm going to want some pointers from the gurus on
> the no doubt obvious tweaks that I could make to my hamming entry -
> is this the place for such discussions?

A bit of technique is needed here:

1) printing $_ is the default, so all that's missing is the newline. You can
   get that using -l
2) Always keep both the string and array view in mind. switch between them
  often

Combining these two we get:
-l $t=pop;$_.=$w++&$w?($t=~s/.//,$f^=$w*$&,$&):2while~$t;s#2#1&$f/$+[0]#eg;print

Which is a 80 and breaks even with the best string based solution on the list.
And others on this list might see further improvements.

For bigger gains, you also have to think of multiple algorithms of course.

Reply via email to