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.
Added an explanation to https://www.codewars.com/kata/reviews/53d40c81f4eb76d6d7000b6f/groups/5971d1713f2d384bd3001389
Added an explanation to https://www.codewars.com/kata/reviews/53d40c81f4eb76d6d7000b6f/groups/5971d1713f2d384bd3001389
[...] is called the spread syntax. When we write [...str], it spreads the string into an array of its individual characters. This is necessary because reverse() only works on arrays.
Without the spread (just [str]), you'd get an array with the entire string as a single element — not what we want in this case.
Very fun to solve! Enjoyed it a lot!
This is really clever & simple. I don't think I would've ever thought to subtract from hd.
Haskell translation
I've made a translation that modifies the description to address this.
IIUC there is no right answer for this.
I don't know if the description got more specific in the meantime, but I was also curious so I already checked... 420690045 is not a multiple of 45, so it's definitely a "crazy value".
-420690045 % 45 == -30
, and-420690045 % 360 == -165
doesn't match any direction.Yours and the solutions that match your results are probably rounding off, turning -165 (-45 * 3.66...) to -135 (-45 * 3) with integer division or some equivalent, somewhere.
When kata authoring is done right, you have a unique problem. Neither the internet nor an AI will know what to do with your kata.
Is fixed, thank you!
Should be fixed, please verify.
Too easy, I thought my metod will be too slow because it was so simple, but here we are.
I have no time to fix this today, but if anyone gets to this before me, here is how to fix the issue: https://docs.codewars.com/languages/cpp/igloo/stringizers#stringification-with-stringizert
C++ (sample) test code does not support pairs. Consider dummy solution:
The following test code passes:
The following test code fails:
with error
0
can be solved, but the description says "positive", and the tests now do not generate zeroes ( this was probably changed relatively recently ).Loading more items...