Longest Common PrefixEasy

string trie

Find the longest string that is a prefix of every word in the array. Three approaches, same problem — switch between them and watch how each one converges on the answer.

Press play to watch the algorithm run.
Metrics
Legend
How it works
0 / 0