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.
https://www.codewars.com/kumite/6508e5fa3b1253006574d200?sel=6508e5fa3b1253006574d200 << Java Translation that needs reviewing ฅ^•ﻌ•^ฅ
Approved by 🧙
Python new test framework
why all the cases always return "didn't work"?
This comment is hidden because it contains spoiler information about the solution
Using random for tests is bad practice.
C# translation kumited. Kata differs just a little bit. If given parameter is 0 or negative, you should return an emtpy array. Different parameter type than integer is not included.
For me it felt a bit weired to return -1 if the function fails, instead of None or throwing an exception (did it in python), Otherwise nice kata.
Nice kata, good instructions and example tests. Randomised tests would be a good addition.
With 0 having infinite factors, I am not sure what a correct output would be so I will change description so 0 should return -1 as well.
edit: test case added too
What is the correct output when the input is 0?