Find maximum occurring character in a string
Problem
You are given an string S, Your task is to find out the character whose occurance is most. If there are more than 1 character which have same occurance, then print the one that comes alphabetically first.
Example
Input
HackersFriend
Output
e
Here in this example, we can see there are two characters which are occuring 2 times, e and r. But e comes first alphabetically, so we print e as our output.
Solution
We will use Hashing to solve this problem efficiently.