@@ -0,0 +1,754 @@
+package leetcode;%0A%0Aclass LongestCommonPrefix %7B%0A%0A    public String longestCommonPrefix(String%5B%5D strs) %7B%0A        if (null == strs %7C%7C strs.length == 0) return %22%22;%0A        if (strs.length == 1) return strs%5B0%5D;%0A        String first = strs%5B0%5D;%0A        for(int i = 0; i %3C first.length(); i++) %7B%0A            char c = first.charAt(i);%0A            for(int j = 1; j %3C strs.length; j++) %7B%0A                String s = strs%5Bj%5D;%0A                if (s.length() %3C= i %7C%7C s.charAt(i) != c) return first.substring(0, i);%0A            %7D%0A        %7D%0A        return first;%0A    %7D%0A    %0A    public static void main(String%5B%5D args) %7B%0A        LongestCommonPrefix prefix = new LongestCommonPrefix();%0A        System.out.println(prefix.longestCommonPrefix(new String%5B%5D%7B%22a%22, %22ab%22%7D));%0A    %7D%0A%7D

add LongestCommonPrefix