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

 

norm.krumpe@muohio.edu program9 > countSingles
prev  |  next  |  chance

Given a string, return a count of the number of characters in the string that appear exactly one time in the string. For example, in the string "bacbaae", only the 2 characters "c" and "e" appear one time, so countSingles("bacbaae") should return 2.


countSingles("bacbaae") → 2
countSingles("abc") → 3
countSingles("xx") → 0

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

int countSingles(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

Difficulty: 300

Copyright Nick Parlante 2017 - privacy