Originally posted by fred rosenberger: a Map might be overkill... since there are only 26 letters in the western alphabet, you could just use an array. iterate through the string, and increment the proper value.
Then, when done parsing the string, loop through the array to find which letter has the most.
Yup. That's a better idea indeed. . Didn't occur to me initially.