@@ -0,0 +1,604 @@
+package LongestCommonPrefix;%0A%0A/**%0A * Write a function to find the longest common prefix string amongst an array of strings.%0A */%0Apublic class Solution %7B%0A%0A    public String longestCommonPrefix(String%5B%5D strs) %7B%0A        if (strs.length == 0) %7B%0A            return %22%22;%0A        %7D%0A        String str = strs%5B0%5D;%0A        for (int i = 0; i %3C str.length(); i++) %7B%0A            for (int j = 1; j %3C strs.length; j++) %7B%0A                if (i %3E= strs%5Bj%5D.length() %7C%7C strs%5Bj%5D.charAt(i) != str.charAt(i)) %7B%0A                    return str.substring(0, i);%0A                %7D%0A            %7D%0A        %7D%0A        return str;%0A    %7D%0A%7D

14. Longest Common Prefix