@@ -0,0 +1,1428 @@
+package com.si.jupiter.smart.channel;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0A%0Apublic class LeeCode3 %7B%0A    /**%0A     * %E7%BB%99%E5%AE%9A%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%EF%BC%8C%E8%AF%B7%E4%BD%A0%E6%89%BE%E5%87%BA%E5%85%B6%E4%B8%AD%E4%B8%8D%E5%90%AB%E6%9C%89%E9%87%8D%E5%A4%8D%E5%AD%97%E7%AC%A6%E7%9A%84 %E6%9C%80%E9%95%BF%E5%AD%90%E4%B8%B2 %E7%9A%84%E9%95%BF%E5%BA%A6%E3%80%82%0A     * %E7%A4%BA%E4%BE%8B 1:%0A     * %E8%BE%93%E5%85%A5: %22abcabcbb%22%0A     * %E8%BE%93%E5%87%BA: 3%0A     * %E8%A7%A3%E9%87%8A: %E5%9B%A0%E4%B8%BA%E6%97%A0%E9%87%8D%E5%A4%8D%E5%AD%97%E7%AC%A6%E7%9A%84%E6%9C%80%E9%95%BF%E5%AD%90%E4%B8%B2%E6%98%AF %22abc%22%EF%BC%8C%E6%89%80%E4%BB%A5%E5%85%B6%E9%95%BF%E5%BA%A6%E4%B8%BA 3%E3%80%82%0A     * @param args%0A     */%0A    public static void main(String%5B%5D args)%7B%0A        //String s = %22abcabcdbb%22;%0A        String s = %22aabsdefghka%22;%0A        int res_index = 0;%0A        int res_max = 1;%0A        int str_length = s.toCharArray().length;%0A        for (int i = 0;i%3Cstr_length;i++)%7B%0A            int j = i+1;%0A            //%E8%AE%B0%E5%BD%95%E4%BB%8E index =i %E5%BC%80%E5%A7%8B%E6%89%80%E6%9C%89%E7%9A%84%E5%AD%97%E7%AC%A6%E5%87%BA%E7%8E%B0%E7%9A%84%E5%BC%80%E5%A7%8B%E4%BD%8D%E7%BD%AE%0A            HashMap%3CCharacter,Integer%3E window_index = new HashMap%3C%3E();%0A            window_index.put(s.charAt(i),i);%0A            for (; j %3C str_length; j++) %7B%0A                if(window_index.containsKey(s.charAt(j))%7C%7Cj==str_length-1)%7B%0A                    if(j-i%3Eres_max)%7B%0A                        res_max=j-i;%0A                        res_index=i;%0A                    %7D%0A                    break;%0A                %7D%0A                else %7B%0A                    window_index.put(s.charAt(j),j);%0A                %7D%0A            %7D%0A%0A%0A        %7D%0A        if (res_max==1)%7B%0A            System.out.println(s.charAt(res_index));%0A        %7D%0A        else %7B%0A            System.out.printf(%22max  child seq  length is %25d, the start index is %25d,and the seq is %25s%5Cn%22, res_max, res_index, s.substring(res_index, res_index + res_max));%0A        %7D%0A    %7D%0A%7D%0A

find the max child seq