Letter most
Practice
3.9 (57 votes)
Algorithms
String manipulation
Problem
94% Success 6853 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Lonely Y loves his string \(s\) of lowercase letters, Y is about to escape so he should choose just one lowercase letter \(c\) and carry all letters in \(s\) which is equal to \(c\) with himself.
What is the maximum number of letters Y can carry with himself?
Input
First line contains only \(n\), legnth of string \(s\).
Second line contains string \(s\) of lowercase letters.
\(1 \leq n \leq 10^5\)
Output
The only line of output contains an integer which is maximum number of letters that Y can carry.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
1.String
Points:10
25 votes
Tags:
AlgorithmsEasyString Manipulation
Points:10
10 votes
Tags:
AlgorithmsString Manipulation
Editorial
Login to unlock the editorial