Problem 3043 · Medium

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.

Open the interactive visualisation