Find the Length of the Longest Common Prefix
Store every decimal prefix of one array in a set, then test each number of the other array from its longest prefix down.
Store every decimal prefix of one array in a set, then test each number of the other array from its longest prefix down.