Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 128: Working With Strings - Part 1
Implement `longestCommonPrefix(strs)` returning the longest common prefix shared by all strings, or an empty string if there is none.
+ 1 hidden test run on Submit.
Shrinking a candidate prefix until all strings share it yields the longest common prefix.
Run your code to see results.