@@ -0,0 +1,1088 @@
+public class Solution %7B%0A    /*%0A     * @param source: source string to be scanned.%0A     * @param target: target string containing the sequence of characters to match%0A     * @return: a index to the first occurrence of target in source, or -1  if target is not part of source.%0A     */%0A    public int strStr(String source, String target) %7B%0A        // write your code here%0A        %0A        if(source == null %7C%7C target == null) %7B%0A            return -1;%0A        %7D%0A        %0A        if(source.equals(%22%22) && target.equals(%22%22)) %7B%0A            return 0;%0A        %7D%0A        %0A        char%5B%5D s = source.toCharArray();%0A        char%5B%5D t = target.toCharArray();%0A        %0A        int slen = source.length();%0A        int tlen = target.length();%0A        %0A        for(int i = 0; i %3C= slen - tlen; i ++) %7B%0A            int tmp = 1;%0A            for(int j = 0; j %3C tlen; j ++) %7B%0A                if(s%5Bi+j%5D != t%5Bj%5D) %7B%0A                    tmp = 0;%0A                    break;%0A                %7D%0A            %7D%0A        %0A            if(tmp == 1) %7B%0A                return i;%0A            %7D%0A        %7D%0A        return -1;%0A    %7D%0A%7D

add 13