Skip to content

Problem 2: Most frequent character

Course: Intro Class 2- DSA - chapter 5

Given a string containing lower case english alphabets, what is the most occurring character?

Example 1:

Input: s = "hello"
Output: l
Explanation: Frequencies - 'h': 1, 'e': 1, 'l': 2, 'o': 1