Is (Efficient) Commonality Really This Hard?

Todd Olson

Cornell University

Friday, 12:05 PM in Rangos I.

See http://www.people.cornell.edu/pages/tco2/papers/common_leading_substring/2000-06

Task:  Find the common leading substring for two give strings.
 
Example:

    s1 = "Lemon tarts are made by bakers"
    s2 = "Lemon trees grow in warm places"

The common leading substring is

     c = "Lemon t"

This task appears to be surprisingly difficult to do in Perl.  It appears to be even harder to do it efficently.  Many different "solutions" are presented.  The question "How best to extend Perl to encompass (a generalized version of) this task?" is raised but left unresolved.
 

Next | Previous | Author list | Schedule | YAPC 19100