Ad
  • Default User Avatar

    4 months later, i agree!! and forever

  • Custom User Avatar

    This is an issue with your code, you need to make sure your string terminates properly to stop memory allocation! (Not a kata issue)

  • Default User Avatar

    Consider adding another test case:

    step = 4, start = 12, end = 16

    Which I believe should return [0, 0] as some solution will fail this.
    11, {12, 13!, 14, 15, 16}, 17!

  • Default User Avatar

    Thanks, I just needed to read instructions carefully.

  • Default User Avatar

    There are no errors in the tests.

  • Default User Avatar

    I believe there may be an issue with one of the test, but it could be my BASH code!

    I am passing the basic tests, but when clicking the "Attempt" button I am getting a fail.

    In trying to debug the situtation I am returning the parameters passed in which are as follows.

    dotest 6 100 110 "101 107"
    

    But when I look at the prime numbers between 100 - 110 (inclusive) I get the following with step count.

    i=100 s=0
    i=101 s=0  is_prime
    i=102 s=1
    i=103 s=2  is_prime
    i=104 s=1
    i=105 s=2
    i=106 s=3
    i=107 s=4  is_prime
    i=108 s=1
    i=109 s=2  is_prime
    i=110 s=1
    

    Am I missing something or is there an issue with the test?

  • Default User Avatar

    When you post an issue: give input and result of the test (written in red).
    BTW there are no errors in the tests.

  • Default User Avatar

    In BASH test failing when EXPECTED == ACTUAL are the same?

  • Default User Avatar

    Test case for movies (card = $0, ticket = $10, and percentage = 0.95) == 2 cannot be as if the card doesn't cost anything and you get the card then the first movie with the card will be less then not having the card for the first movie. Or am I missing something?

  • Default User Avatar

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

  • Custom User Avatar

    What language?

  • Default User Avatar

    Couldn't find ~~ in the GNU bash manual nor in the manpages, but it sure is working under bash version 5.1.4
    It really makes it easy to reverse case.

  • Default User Avatar

    I don't think the test cases should have passed this as each count is not on a separate line?
    The following would have worked, ignoring the while-loop requirement.

    printf "Count: %s\n" {1..20}

  • Default User Avatar

    There seems to be an issue with a test case here?
    I have tried with validating pointers, accepting any char and char only between 0 - 9,
    but always failing ATTEMPT.

  • Default User Avatar

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