about | help | code help+videos | done | prefs |
countSingles
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 300
Copyright Nick Parlante 2017 - privacy