A very simple O(n+m) algorithm for finding clusters of characters in a string.