If you first sort the array lexically all you need to do is compare the first and last entries. I've not benched it but would expect this to be most efficient for any large array.
In reply to Re: An efficient way to gather a common portion of several strings' beginnings
by hippo
in thread An efficient way to gather a common portion of several strings' beginnings
by igoryonya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |