Retired
Count letters in string (retired)
689 of 4,867nza
Loading description...
Strings
Fundamentals
View
Career Accelerator
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Kata description says that it expects a hash value as output , however in JS it expects an object literal and not a map .
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/110.
Please join the discussion to help us identify duplicate kata and retire them.
Retired.
I thought it was kind of odd that none of the test cases have any uppercase characters. Seems like the problem should either specify that the input string will be lowercase or to include some uppercase characters. Other than that I think this one is great.
The test case shows
(letter_count('arithmetics'), {:a=>1, :c=>1, :e=>1, :h=>1, :i=>2, :m=>1, :r=>3, :s=>1, :t=>2})
but the word 'arithmetics' only has one 'r' not three. Can't pass the test cases with that error.COBOL translation (author is inactive).
This comment has been hidden.
This comment has been hidden.
This kata has been solved more than 1500 times in JS and tests are ok. Yes you are missing something, or there is a problem with your code. It seems you are overcomplicating the thing, I can't tell more because it's not quite readable (please use markdown tags to format your code or it's very discomfortable to read, see: how-to-format-code-in-markdown). Anyway, you may ask a question but a problem with your code is not a kata issue.
What's wrong with array.tally?
That needs Ruby >= 2.7
Isn't this just a duplicate of this?
Sure, although this one is also quite old
Should I remove the issue?
This comment has been hidden.
You may want to block imports in Python, otherwise this is an extremely easy 6kyu. Example solution: https://www.codewars.com/kata/reviews/5d9dfbe5e6cc2d0001e3fae9/groups/5d9dfcdf628e4600018939cc
EDIT: making the change would disqualify most of the Python solutions, so it's to your discretion whether you want to change it or not.
JS: the name of the function in the solution setup is incorrect
And the description should specify that only lowercase letters will be used.
Fixed.
Thank you so much for great kata :)
Javascript and Python translations, cheers :)
see issue above, please
Crystal translation submitted for approval. Nice kata, by the way!
Approved. Thanks for taking your time to translate this kata.
No problem, thanks!
Hi! 2 users tests expect string as key instead of symbols.
Hi, I am not sure which tests you are referring to. I've checked random tests for a few time and find that all are validating for 'symbol'. I also run your code and another's code and find that both are returning 'symbol' as key as expected.
Oops...I see now. The example test cases have been updated. My bad, should have checked preview before publishing. Thanks for pointing out.
This is my first kata and it will be great if someone can show me how to add random test cases.
Hi, you can see the testcases of other solved katas - so you only have to open "Show Kata Test Cases" for a solved kata and you surely can find examples for random tests;-)! By the way, congrats to your first kata;-)!
Oic, thanks. I'll look around as you advised.