public boolean rearrangeAtleastkDistanceAway(char input[],int k){
        Map<Character,Integer> map = new HashMap<Character,Integer>();
        for(int i=0; i < input.length; i++){
            int count = 1;
            if(map.containsKey(input[i])){
                count = map.get(input[i]);
                count++;
            }
            map.put(input[i], count);
            input[i] = 0;
        }
        return rearrangeAtleastkDistanceAway(map, input, 0, k);
    }
http://www.geeksforgeeks.org/rearrange-a-string-so-that-all-same-characters-become-at-least-d-distance-away/
src/com/interview/string/RearrangeDuplicateCharsdDistanceAway.java