@@ -0,0 +1,975 @@
+/*%0A * http://www.lintcode.com/zh-cn/problem/compare-strings/%0A * %E6%AF%94%E8%BE%83%E4%B8%A4%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2A%E5%92%8CB%EF%BC%8C%E7%A1%AE%E5%AE%9AA%E4%B8%AD%E6%98%AF%E5%90%A6%E5%8C%85%E5%90%ABB%E4%B8%AD%E6%89%80%E6%9C%89%E7%9A%84%E5%AD%97%E7%AC%A6%E3%80%82%E5%AD%97%E7%AC%A6%E4%B8%B2A%E5%92%8CB%E4%B8%AD%E7%9A%84%E5%AD%97%E7%AC%A6%E9%83%BD%E6%98%AF%E5%A4%A7%E5%86%99%E5%AD%97%E6%AF%8D%0A * %E6%A0%B7%E4%BE%8B%0A * %E7%BB%99%E5%87%BA A = %22ABCD%22 B = %22ACD%22%EF%BC%8C%E8%BF%94%E5%9B%9E true%0A * %E7%BB%99%E5%87%BA A = %22ABCD%22 B = %22AABC%22%EF%BC%8C %E8%BF%94%E5%9B%9E false%0A */%0A%0A%0Apublic class Solution %7B%0A    /**%0A     * @param A : A string includes Upper Case letters%0A     * @param B : A string includes Upper Case letter%0A     * @return :  if string A contains all of the characters in B return true else return false%0A     */%0A    public int count(String str, char c) %7B%0A        int res = 0;%0A        for(char element : str.toCharArray()) %7B%0A            if(c == element)%0A                res += 1;%0A        %7D%0A        return res;%0A    %7D%0A    public boolean compareStrings(String A, String B) %7B%0A        // write your code here%0A        for(int i = 0; i %3C B.length(); i++) %7B%0A            char c = B.charAt(i);%0A            if(count(A, c) %3E= count(B, c)) %7B%0A                %0A            %7D else %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Create linecode_比较字符串.java