@Override
        public boolean equals(Object obj) {
            if (this == obj)
                return true;
            if (obj == null)
                return false;
            if (getClass() != obj.getClass())
                return false;
            CharCount other = (CharCount) obj;
            if (!getOuterType().equals(other.getOuterType()))
                return false;
            if (ch != other.ch)
                return false;
            return true;
        }
http://www.geeksforgeeks.org/rearrange-a-string-so-that-all-same-characters-become-at-least-d-distance-away/
src/com/interview/string/RearrangeDuplicateCharsdDistanceAway.java