7 kyu
Find factors of a number
901 of 2,143zCo
Loading description...
Sorting
Arrays
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
very bad kata
https://www.codewars.com/kumite/6508e5fa3b1253006574d200?sel=6508e5fa3b1253006574d200 << Java Translation that needs reviewing ฅ^•ﻌ•^ฅ
Python new test framework
Approved by 🧙
why all the cases always return "didn't work"?
This comment has been hidden.
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.
What is the correct output when the input is 0?
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