Skip to content

Instantly share code, notes, and snippets.

@XVicarious
Created November 15, 2014 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XVicarious/20c05b7252d0e6ecf301 to your computer and use it in GitHub Desktop.
Save XVicarious/20c05b7252d0e6ecf301 to your computer and use it in GitHub Desktop.
public HashMap<Character, Integer> getCharacterCounts() {
HashMap<Character, Integer> tweetCharacters();
//iterate through tweets
//for each character in string
if (tweetCharacters.containsKey(/*CHARACTER*/)) {
tweetCharacters.put(/*CHARACTER*/, tweetCharacters.get(/*CHARACTER*/) + 1);
} else {
tweetCharacters.put(/*CHARACTER*/, 1);
}
//end for
//end iteration
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment