in reply to Re: Find the common beginning substring in an array of strings (Updated)
in thread Find the common beginning substring in an array of strings

Pretty smart and super fast, only works with an even number of strings though. Off the top of my head I'd say for an uneven number just duplicate one of the strings.

Gotta go and pick up my son from kindergarten, otherwise there'd be code to support my claim :)

  • Comment on Re^2: Find the common beginning substring in an array of strings

Replies are listed 'Best First'.
Re^3: Find the common beginning substring in an array of strings
by BrowserUk (Patriarch) on Jun 06, 2012 at 18:54 UTC

    I've updated my node with a correction. Thanks.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?