[LeetCode] Longest Common Prefix (Java)
Write a function to find the longest common prefix string amongst an array of strings. Analysis This is a simple problem. We can just check for each position of every string in the string array. But we need to take care of some strings that is shorter than others. Since there is two loops, we … Read more