private void incrementCount(Character ch, Map<Character, Integer> count) {
        if (count.containsKey(ch)) {
            int c = count.get(ch);
            count.put(ch, c + 1);
        } else {
            count.put(ch, 1);
        }
    }
http://www.careercup.com/question?id=5389078581215232
Given two strings tells if anagram of first is substring of another
Keep map of characters in array1 and keep checking if array2 has these characters.
main string : a b a c a b b and looking for a a b b c when 3rd a is encountered
we move index to second a and start from there.

Another idea is to keep a sorted linklist of string in comparison. Whenever a new character
is to be added remove last character from linklist and add this new one.
src/com/interview/string/AnagramOfFirstAsSubstring.java