Most Frequent Character with Lexicographical Tie-Breaking

Given a non-empty string s, count the frequency of every character and return the character with the highest frequency.

If multiple characters have the same maximum frequency, return the **lexicogr...

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: