[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Quick hack for common length



On Tue, Jun 26, 2001 at 02:37:51PM +0530, Abhijit Menon-Sen wrote:
> >
> > In #perl today, we were looking at a longest substrings problem,
> > utilizing a suffix tree solution.
> 
> Todd Olson spoke about this at YAPC 19100:

I was there but I didn't see the talk.  Actually I got the idea for 
hacking on it today from an April 2001 article in DDJ.  Of course the 
article examples were in C.  

> (For what it's worth, the $a^$b =~ m/^\0+/ solution was the fastest he
> found, as well.)

Now that's interesting.  All of the ways to TIMTOWDI and I run across
this one.  Originally I was futzing around with the bits on paper 
and did something like:

	$a^(~$b)=~m/^(\xff)+/

And dngor (I think) saved me the extra op.

-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours  *and*
  clintp@geeksalad.org         Perl Developer's Dictionary -- May 2001
"If you rush a Miracle Man,     for details, see http://geeksalad.org     
	you get rotten Miracles." --Miracle Max, The Princess Bride

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe