InterviewSolution
Saved Bookmarks
| 1. |
How to find the maximum occurring character in given String? |
|
Answer» Logic to find maximum occurring CHARACTER in string Input string from USER, store it in some variable say STR. Declare another ARRAY to store frequency of all alphabets, say FREQ [26]. ... Initialize frequencies of all alphabets in freq array to 0. Find frequency of each character present in the string. Maximum occurring character in string is maximum occurring value in the freq array.Explanation: |
|