7 kyu
Array of all primes up to number N
351 of 494otamm
Loading description...
Mathematics
Algorithms
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.
Initial Solution Setup:
I don't think overwriting its own function is a good practice.
This comment has been hidden.
It often happens kata difficulties are very different from one language to another.That may be because of different builtin functions, sometimes because tests are not equitable... If we follow this, many katas should be restricted to a few languages, or exclude some others... For example a language like C has very few builtin functions in comparison with others... so what should we do? Restrict translations of original C katas and Restrict translations of other languages to C? Moreover when languages are updated they may have new builtin functionalities. This is not actually manageable, this is a very general issue on CW, it's part of it, we have to do with it.
@akar-0 it's the translator's responsibility to ensure the difficulty stays the same.
Thanks for the nice kata!
needs random test cases :(
Random test cases now available for both Ruby and Javascript versions.
It a duplicate: http://www.codewars.com/kata/array-of-primes And error in testcase... ([]!=[]? a.s.o)
Not exactly a duplicate; this kata asks for primes in a range, mine asks for all primes up to a number. Similar logic, yes, but not "duplicate". Also, is this error in the Ruby or Javascript version?
Yes i saw, copied my old solution and set s=1 for start at 1 - that's all... Error was in JS - same as my solution...
Cool, I've catched the error and it's been corrected.