in reply to Suffix-prefix matching done right
Randomly chosen base64 strings will almost never overlap. And comparing the efficiency of different solutions is not possible with the fuzzy specs given.
So efficiency will also depend on the nature of the real data.
My suggestions:
But you don't need to try all possible length, because only a small number of positions are likely:
This should be far more efficient than your code.
I.e. when is a longer overlap with one mismatch "better" than a shorter with none?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) euphemism for buggy
|
|---|