Ad
  • Custom User Avatar

    Please explain the second example, as it's not clear (for me, at least)

    'Hello He worldwrd' --> 'lllHeo He wordwrd' (not 'lllHHeeoo  wwrrdd')
    
    • Why are all ls together in the first word, and not in the 1st and 3rd?
    • Why does the o stay in the 3rd word of the output, if the l in the same word moved to the 1st?
    • If they should all appear at the first appearance, why is there a separate He in the output?
    • Why the multiple ws and ds are not grouped in the 3rd word of the output?
  • Custom User Avatar

    Python: Random tests are vulnerable to input modification.

  • Custom User Avatar

    Python new test framework should be used (Refer this for more detail)

  • Custom User Avatar

    Python new test framework should be used (Refer this for more detail)

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    Python: Random tests are vulnerable to input modification

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    Do not use rounding (or stringification) to work around problems with precision. read this

  • Custom User Avatar

    Python: failing tests overflow th output buffer.

  • Custom User Avatar

    It is unclear from the description whether days means "n days after from, then skip to the next weekday", or "n weekdays after from".

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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,

    cpchars <- function(s) {
      ""
    }
    

    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:

    Not an issue. Using a reasonable algorithm for the problem at hand is part of the task for this kata.

    The algorithm isn't the issue. Making the one change from using the function seq() to seq.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.

  • Custom User Avatar

    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 the from argument, and you can be more explicit that the default for from should be today.

  • Custom User Avatar

    Still lacks novelty.

  • Loading more items...