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.
Fixed examples in the description.
Yes, this is Kotlin.
I assumed that the description of the kata is common to all languages, but I learn that it is necessary to indicate the language
That's in Kotlin, right? Please mention the language next time so it's easier to fix.
Error in examples in task description:
"filterList(ListOf(1, 2, "a", "b", 0, 15)) == [1,0,15]
filterList(ListOf(1, 2, "a", "b", "aasf", "1", "123", 231)) == [1,2,123]"
There are no these errors in the test tasks
Smart! I didn't think that taking the modulus would work like that.
This comment is hidden because it contains spoiler information about the solution
Could've also used 1 in the place of 0 if im not mistaken...
It's kind of specified:
I have attempted to translate to Ruby
It seems that the tests do not take into account some cases, such as
assertEquals("32 is 17+3+3+3+3+3", 6, CodeWare2.solve(32,new int[]{17, 14, 3}));
The tests correspond to a simpler task, and you probably need to specify it in the description.
s.charAt(i) - returns the character code from the ASCII table. The number codes are sequential: '0', '1', '2' ... '9' or in the form of code 48, 49, 50 ... 57. For example, "2".charAt(0) = '2' or 50 (character value and code), but we need to get the number 2,to do this, we just need to subtract the character code '0' (48). "2".charAt(0) - '0' = 50 - 48 = 2
Why is there -'0' included ? What does it mean ?
It was difficult and very interesting!
Great kata! In the java version, there is a typo in the class name "FixProgession" instead of "FixProgression" (there are no errors in other languages with the class name).
Fixed, thanks for your feedback!
Loading more items...