Maximum Occurring Character

Given a string, find the character that appears most frequently. If there are multiple characters with the same frequency, return the lexicographically smallest character.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: