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.
Please explain the second example, as it's not clear (for me, at least)
l
s together in the first word, and not in the 1st and 3rd?o
stay in the 3rd word of the output, if thel
in the same word moved to the 1st?He
in the output?w
s andd
s are not grouped in the 3rd word of the output?Python: Random tests are vulnerable to input modification.
Python new test framework should be used (Refer this for more detail)
Python new test framework should be used (Refer this for more detail)
python new test framework is required. updated in this fork
Python: Random tests are vulnerable to input modification
python new test framework is required. updated in this fork
python new test framework is required. updated in this fork
Do not use rounding (or stringification) to work around problems with precision. read this
Python: failing tests overflow th output buffer.
It is unclear from the description whether
days
means "n
days afterfrom
, then skip to the next weekday", or "n
weekdays afterfrom
".The former doesn't make too much sense from the description (we aren't working on the weekend, so why are they counted?), and if it's the latter I'm pretty sure there's already an approved kata about counting only business days.
This comment is hidden because it contains spoiler information about the solution
DEEPLY flawed. It cannot be completed because your code is too slow for the tests, you have too many tests, and the tests are too long.
To test, I made my solution,
And it took over 9 seconds to run.
So, even if my code was 3x faster than the reference code, it would be impossible for me to pass this kata.
Edit: It seems it is possible to do with very highly optimized code, which is fine, but the kata should state that it is specifically looking for a highly optimized prime number sieve.
The author answered a previous question about the task with the following statement:
The algorithm isn't the issue. Making the one change from using the function
seq()
toseq.int()
is the only thing which enables passing the kata, outside of pre-generating a table of primes and loading it remotely. If you want this kata to be about hyper-optimization, that's fine, just be very explicit about it in the Details page, otherwise it should be passable by someone writing, as you say, a reasonable algorithm.For novice programmers and for those for whom English is not their native language, you should consider cleaning up the description of the formal arguments. Specifically,
days
should be the number of days from thefrom
argument, and you can be more explicit that the default forfrom
should be today.Still lacks novelty.
Loading more items...