CT1543

Arjun's ribbons Most Frequent Mark

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Every season at the copper works of Verdigris, someone must settle a dispute between crews. This year the task falls to Arjun, armed only with the ribbons register. 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| <= 100; s contains lowercase English letters.

Example 1:

Input: tbmqsrfyrni
Output: r

Example 2:

Input: aqtxtsjflifypklaceuoeudfwjciduqhkn
Output: f

Example 3:

Input: pnyihjurkckuvemksnrvrjamcsqbzmcqyxceljysjdpoubazmocmieawlrfvkvphzuxbugiowshmqd
Output: m

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Arjun's ribbons Most Frequent Mark - EASY Coding Problem | CodeTikki