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.
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
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
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
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).
I suppose a typo in the task description, it should train 2 hours and not 3.
Original text: Gooble that starts with S=100 and a schedule that reads TTCCB would instruct the Gooble to train for 3 hours
According to the text of the task "(e and f integers >= 0)", but in tests they can be negative. Until I removed the checks for negativity, I could not pass the tests.