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.
letter is not used?
Yes, this solution isn't exactly best practice even if it is syntactically short.
This comment is hidden because it contains spoiler information about the solution
How many words out there have 5000 letters?
isn't calling count on every character equal to a loop that iterates the whole array every time?
The number of letters in a word is not an arbitrarily large number, it's bounded at ~30 on the high end.
Agreed. This ends up running O(n^2), when a time/space tradeoff can make it O(2n).
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Doesnt count run the whole array through? Meaning this has a runtime of O(n^2) when this can be solved in O(n) time?
This comment is hidden because it contains spoiler information about the solution
Thanks for the comment marcmoy. I'm actually not sure as I haven't had a job in the industry yet. It's a good question though I'd like to know as well.
I like how the code is presented. Is it common for people in industry to insert line breaks when using multiple methods directed towards the same object?
Loading more items...