Create a method to find the longest common prefix among an array of strings.
MediumProblem Statement
Create a method to find the longest common prefix among an array of strings.
Sample Input
["flower", "flow", "flight"]
Sample Output
fl
Limits
Time: 2s · Memory: 256 MB