@@ -0,0 +1,738 @@
+public class Solution %7B%0A    /**%0A     * @param strs: A list of strings%0A     * @return: The longest common prefix%0A     */%0A    public String longestCommonPrefix(String%5B%5D strs) %7B%0A        if (strs == null %7C%7C strs.length == 0) %7B%0A            return %22%22;%0A        %7D%0A        // use first one as prefix, compare to other string in the list, until end.%0A        String prefix = strs%5B0%5D;%0A        for (int i = 1; i %3C strs.length; i++) %7B%0A            int j = 0;%0A            while (j %3C strs%5Bi%5D.length() && j %3C prefix.length() && prefix.charAt(j) == strs%5Bi%5D.charAt(j)) %7B%0A                j++;%0A            %7D%0A            if (j == 0) %7B%0A                return %22%22;%0A            %7D%0A            prefix = prefix.substring(0,j);%0A        %7D%0A        return prefix;%0A    %7D%0A%7D%0A

Create LongestCommonPrefix.java