This is a CodeWars problem that requires returning a HashMap of the count of characters within a string. Approach 1: HashMap def count(s): letterCount = {} for c in s: letterCount[c] = 1 + letterCount.get(c, 0) return letterCount ...
Markdown supported · ⌘↵ to post
No responses yet.