Caravans arrive at
the marble forum of Argentium with crates of verses, and Harish the auditor must account for every last one.
Task: Read a lowercase string s and print the character that occurs most often. If several tie, print the alphabetically smallest.
Input format: One line with a single lowercase string s.
Output format: Print a single character.
Constraints: 1 <= |s| <= 52; s contains lowercase English letters.
Example 1:
Input: pkozcekpksbdvc
Output: k
Example 2:
Input: doshmtfawxyblw
Output: w
Example 3:
Input: dgnanlhhtspolctjkmqadnaixsljhecraaaqtwm
Output: a
Constraints:
1 <= |s| <= 52; s contains lowercase English letters.
Loading...
Test Cases:No test cases
No test cases available.
The Roving Most Frequent Mark - EASY Coding Problem | CodeTikki