package leetcode;

/**
 * https://leetcode.com/problems/minimum-window-substring/
 */
public class Problem76 {
    public String minWindow(String s, String t) {
        // TODO
        return "";
    }

    public static void main(String[] args) {
        Problem76 prob = new Problem76();
        System.out.println(prob.minWindow("ADOBECODEBANC", "ABC")); // BANC
    }
}

@@ -12,16 +12,69 @@
 tcode;%0A%0A
+import java.util.Objects;%0Aimport java.util.TreeSet;%0A%0A
 /**%0A * h
@@ -219,34 +219,1778 @@
     
-// TODO%0A        return %22%22;
+TreeSet%3CCharacter%3E charSet = new TreeSet%3C%3E();%0A        for (char c : t.toCharArray()) %7B%0A            charSet.add(c);%0A        %7D%0A        TreeSet%3CCharIdx%3E charIdxSet = new TreeSet%3C%3E();%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            char c = s.charAt(i);%0A            if (charSet.contains(c)) %7B%0A                charIdxSet.add(new CharIdx(c, i));%0A            %7D%0A        %7D%0A        charIdxSet.forEach(System.out::println);%0A        int min = Integer.MAX_VALUE;%0A        for (CharIdx ci : charIdxSet) %7B%0A%0A        %7D%0A        return %22%22;%0A    %7D%0A%0A    private static class CharIdx implements Comparable%3CCharIdx%3E %7B%0A        private final char character;%0A        private final int idx;%0A%0A        public CharIdx(char character, int idx) %7B%0A            this.character = character;%0A            this.idx = idx;%0A        %7D%0A%0A        @Override%0A        public int compareTo(CharIdx o) %7B%0A            return Integer.valueOf(idx).compareTo(Integer.valueOf(o.idx));%0A        %7D%0A%0A        @Override%0A        public boolean equals(Object o) %7B%0A            if (this == o) return true;%0A            if (o == null %7C%7C getClass() != o.getClass()) return false;%0A            CharIdx charIdx = (CharIdx) o;%0A            return character == charIdx.character;%0A        %7D%0A%0A        @Override%0A        public int hashCode() %7B%0A            return Objects.hash(character);%0A        %7D%0A%0A        @Override%0A        public String toString() %7B%0A            final StringBuilder sb = new StringBuilder(%22CharIdx%7B%22);%0A            sb.append(%22character=%22).append(character);%0A            sb.append(%22, idx=%22).append(idx);%0A            sb.append('%7D');%0A            return sb.toString();%0A        %7D%0A    %7D%0A%0A    private static class Foo %7B%0A        Foo doSomething(String a) %7B%0A            String b = a.substring(0);%0A            return this;%0A        %7D
 %0A   

Update problem 76