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.
Retired.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/143.
Please join the discussion to help us identify duplicate kata and retire them.
really nice and clean code, taking notes...
why random tests give me a two-digit number if in my IDE I get the correct answer?
This comment is hidden because it contains spoiler information about the solution
OH!
The sample test needs one test that wants a number > 9. Otherwise you will type up a solution to only find out that it will pass the sample test, but fail the test itself because you didn't write a solution for numbers > 9. To me that is an issue that causes you to redo your solution entirely and its misleading.
This comment is hidden because it contains spoiler information about the solution
It does not necessarily and it is risky to assume so. They are returned in insertion order.
[Edit: to be precise, I did not found any insurance that going that way - with the constructor - will keep the insertion order]
We sort the letters in alphabetical order then we keep only those to delete. Then, we gradually delete these letters from the initial word (converted into a list). Finally we join the letters.
Add js random tests
It can be relatively simple for this kata.
This feels like the beginning of a kata. Rather than counting animals, it can be solved by simply finding, converting, and summing all integers in the string. Consider the sentence, "There are 3 giraffes, 2 doggos, and 12 socks." The correct answer by description should be
5
, but this kata avoids these types of cases.Maybe this can be part one, and part two requires verifying they are actually animals?
Thank's! Add 1944 & 2023
Looks okay now. Still needs random tests though.
Loading more items...