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.
Updated.
Updated.
Probably.
Function name + keep the description. Otherwise it looks good.
Would you accept the translation if I changed the function name?
Descriptions are the same for all languages, so function names shouldn't be just edited like this.
Let's make the result of division by
0
42
so that it's defined as well...I like this better. You just forgot the '=' in '>='
I like this solution, but it seems hardly worth the effort of writing a function. Nice work!
@JohanWiltink I added random tests. Can a rejected translation be opened?
Submit testing lacks random tests
I just tried it. It works now.
should be good, now.
I think this is why I give up with Swift in codewars. The tests run and pass in 6ms but the process timesout in 12000ms and fails.
Passed: 2 Failed: 0 Errors: 1
Test Results:
SolutionTest
Tests From Example (pass in 4.5ms)
Tests Large Diamonds (pass in 0.3ms)
Completed in 6.611ms
RandomTest
STDERR:
Process was terminated. It took longer than 12000ms to complete
My Swift solution couldn't use arc4random_uniform in Codewars so I wrote my own random function using time.
That just creates a string that repeats
string
n
times. Nothing more to it.Loading more items...