Max Char

  • string

Given a string, return the character that is most commonly used in the string.

Max Char
Examples:
  • maxChar('a') -> 'a'
  • maxChar('Hello') -> 'l'
  • maxChar('abcccccccd') -> 'c'
  • maxChar('apple 1231111') -> '1'

Write your solution

Loading...