Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #107.55K
~3K People Reached
Favorite Forums
Favorite Tags
java x 1

1 Posted Topic

Member Avatar for Ghost

import java.util.*; public class RepeatedExample { public static void main(String[] args) { HashMap<Character, Integer> map = new HashMap<Character, Integer>(); String theString = "aaba"; for (int i = 0; i < theString.length(); i++) { if ( map.containsKey(theString.charAt(i))) { map.put (theString.charAt(i), map.get(theString.charAt(i)) + 1 ); } else { map.put (theString.charAt(i), 1); } …

Member Avatar for JamesCherrill
0
3K

The End.