Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 398 Bytes

File metadata and controls

22 lines (14 loc) · 398 Bytes

Max occurrent char

Instructions

Given a string implement a function which returns the character that is most commonly used in that string.

challenge | solution

Examples

maxChar("abcccccccd") // "c"

maxChar("apple 1231111") // "1"

Hints

Hint 1 Use frequency counter or multiple pointers pattern.