Longest Common Prefix

Strings ยท hard

Implement `longestCommonPrefix(strs)` returning the longest common prefix shared by all strings, or an empty string if there is none.

Learning resources

Loading...

Run your code to see results.