[LRUG] Recursion diversion
Andrew Stewart
boss at airbladesoftware.com
Mon Oct 28 02:43:48 PDT 2013
On 28 Oct 2013, at 09:03, Andrew Stewart <boss at airbladesoftware.com> wrote:
> On 25 Oct 2013, at 15:21, Andrew Stewart <boss at airbladesoftware.com> wrote:
>> Given two strings a and b, I would like to find all the occasions where the letters of b appear in the same order in a. The result should be an array of arrays where each inner array contains the indices of b's matches in a.
>
> Thanks, everyone, for all the solutions. I admire the ingenuity (deviousness?) of your thinking.
P.S. I forgot to say what all this was for: scoring how well an abbreviation matches a string. In particular, how well a file path is matched.
https://github.com/airblade/respecta
Cheers,
Andy
More information about the Chat
mailing list