id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

mostOccurences


Given a non-empty string, return the number of times the most common character occurs. For example, the string "xxyyy" would return 3 because "y" appears 3 times. In the event of a tie, return the tied number of occurrences.


mostOccurences("ababbc") → 3
mostOccurences("112233") → 2
mostOccurences("12312341") → 3

...Save, Compile, Run (ctrl-enter)

public int mostOccurences(String str){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy