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.
Hello.
Could you plese review and approve the Translation for GROOVY - https://www.codewars.com/kumite/65fdbe00825c8314779bd103?sel=65fdbe00825c8314779bd103.
Thank you
n, n-1, ..., 1
via ArgumentCaptors since you can just callfactorial(0)
n-1
times and then calculate with a for loop or so. Additionally the recursion should not force to stop atn==1
but could also go ton==0
so exactlyn
times is too restrictive. Also I would recommend to use a bigger value for this test asn==2
can be rolled and this not really representative value to check for recursion.n==20
in the random tests without overflowinglong
range.org.junit.jupiter.params.ParameterizedTest
andorg.junit.jupiter.api.RepeatedTest
Ehhh... very simple :) Looks good
Hello @user8436785 ,
Forked and added this translation - https://www.codewars.com/kumite/5d0437ab11bd8c002086eeaa?sel=62b6cf6d0ee74b011f9f9458
Though your setup will most likely work,
a more Kotlin-ish solution would be:
I'd also leave out the class for the solution setup and just take the function.
The test can also easily be written in a loop.
Let me know what you think :)
@acraileanu, I changed it so that streams lambdas are used. Please check if it is OK.
Thanks!
I wonder if we could use the lambda operator in the solution to convvey the "arrow"-ness?
.filter(x -> x % 2 == 0)
Hello,
Could you please check and approve the Java Translation (https://www.codewars.com/kumite/62124fda1d5475001661ee49?sel=62124fda1d5475001661ee49) of the kata.
Thanks
Hello All,
I can see that the method names are now OK and tests seem to be fine.
Can this kata be approved?
Thanks
Java translation added. Please review and approve it.
Hello! Kotlin translation added to the Kata. Could you please review it and approve :)
Hello! Kotlin translation added to the Kata.
Rounding intermediate values is ++UnGood. Don't do it. Comparing
da * vb
todb * va
is a perfectly good way to compare intermediate values without introducing floating point representation inaccuracy ( if it introduces overflow, get bigger datatypes ). But distances and speeds should not be modelled as integers anyway.Not raising as an Issue because this will be retired anyway.
Because nobody translates those katas to Groovy/Kotlin, not because they were "authored for a specific language".
Duplicates and low-effort katas certainly don't add any value to CW. If you don't unpublish this kata, it will be retired due to low satisfaction rating anyway.
@ejini战神, @XRFXLP
Added sample and random tests. Please check if now it is OK.
Thank you for the help!
Loading more items...