in reply to Suffix-prefix matching done right

Are you only comparing pairwise, or do you need to compare all combinations of two sets of strings?

I could think of a regex which is efficient, but the overhead to compile it has to be considered.

edit

furthermore, is the alphabet restricted to a and b ?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Suffix-prefix matching done right
by baxy77bax (Deacon) on Nov 04, 2021 at 19:30 UTC
    I am only comparing pairwise and the alphabet is a bit larger, Base64. I restricted it to the above binary form just to make it simpler.