Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Why is this issue marked as resolved? It's still confusing for the same reason (at least for me). Neither sample example included words of varying lengths.
This comment is hidden because it contains spoiler information about the solution
I figured there was a way to do it iteratively, but couldn't think of it. Thanks for this.
It's so frustrating to spend an hour coming up with this, check the comments, and see people accomplish the same thing in like six lines. Amazing.
Fixed, thanks.
Little typo:
occurencences
should beoccurrences
.You're returning a dictionary, not a list of tuples.
Anyone else get this rejected solution?
"{'a': 5, 'b': 2, 'r': 2, 'c': 1, 'd': 1} should equal [('a', 5), ('b', 2), ('r', 2), ('c', 1), ('d', 1)]"
I'm sure the answer will dawn on me soon enough, but seems like that should be acceptable, especially since dictionaries in python usually have curly brackets.
.
It's working fine for me, and it has 11550 completions on js. Post your code with proper markdown and mark your post as having spoiler content.
there is an error.
the basic tests work if I run on them, and if I press on "attemp", the basic tests fail.
on JS
Isn't the whole point of dictionaries to use different key names?