CT1337

The Most Frequent Mark at Caravanrest

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the dune sea of Caravanrest close for winter, Gautam must finish the banners ledger - one figure at a time. 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| <= 127; s contains lowercase English letters.

Example 1:

Input: mfekgwmnwpsfvwvucddhfjxwzavqfkvjepldzcgkufmlcujbykwqwmolpptzhfcelraausjdfbbewyggndi
Output: f

Example 2:

Input: chqhf
Output: h

Example 3:

Input: ptjipogrihvzfprhqgbofcjchunjfdolxhvqvjabojmnhgyobhoqddgeadvmmqorjzvqbsehf
Output: h

Constraints:

1 <= |s| <= 127; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.
The Most Frequent Mark at Caravanrest - EASY Coding Problem | CodeTikki