Speaking of algorithmic efficiency. Consider the case where $string17 eq "x" and preceding values all span kilobytes. Clearly, there's some room for improvement.
Hm. You could sort the strings, but sorting is O(n log n) instead of O(n).
Still think so?
In reply to Re^3: An efficient way to gather a common portion of several strings' beginnings
by BrowserUk
in thread An efficient way to gather a common portion of several strings' beginnings
by igoryonya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |