Ad
  • Custom User Avatar

    For this shape:

    +-----------------+
    |                 |
    |+---+------------+
    ||   |
    ||   |
    ||   |
    |+---+------------+
    |                 |
    +-----------------+"
    

    I think the below 2 sub-shapes should also be accetable?

    +-----------------+
    |                 |
    |    +------------+
    |    |
    |    |
    |    |
    |    +------------+
    |                 |
    +-----------------+
    
    

    and

    +---+
    |   |
    |   |
    |   |
    +---+
    

    Can you tell me why this isnt the case?

  • Custom User Avatar

    I tried again and it worked.. So it appears that the random tests have issues..

  • Custom User Avatar

    When there are multiple paths, the existing test-cases expectes only a specific path

    input:
    t -> [[81, 23, 87, 45, 38, 72, 37, 65, 69, 43, 67, 5, 50, 48, 50, 25, 21, 29, 45, 95, 97, 31, 40, 70, 3, 30, 76, 6, 91, 98, 37, 41, 59, 14, 42, 83, 52, 93, 27, 28, 48, 27, 87, 74, 89, 57, 28, 80, 14, 72], [63, 26, 74, 70, 49, 1, 3, 48, 72, 84, 20, 4, 5, 80, 88, 16, 47, 3, 78, 75, 63, 93, 48, 7, 46, 57, 69, 96, 82, 20, 83, 77, 95, 50, 66, 14, 67, 27, 47, 32, 64, 93, 19, 92, 40, 56, 50, 87, 51, 76], [78, 15, 5, 45, 53, 50, 31, 90, 85, 19, 10, 12, 63, 79, 60, 9, 20, 96, 63, 6, 97, 66, 24, 35, 70, 41, 81, 93, 45, 3, 89, 88, 1, 2, 66, 73, 54, 3, 25, 82, 97, 8, 7, 56, 58, 11, 24, 14, 24, 27], [88, 36, 85, 64, 37, 71, 72, 5, 60, 92, 90, 49, 66, 10, 93, 1, 24, 23, 16, 90, 51, 87, 39, 6, 43, 91, 93, 10, 67, 20, 58, 11, 57, 92, 89, 55, 9, 59, 25, 63, 50, 65, 62, 49, 77, 82, 57, 48, 9, 59], [89, 73, 70, 10, 6, 63, 74, 71, 5, 67, 43, 1, 60, 52, 82, 26, 75, 3, 52, 66, 47, 56, 43, 90, 79, 17, 87, 54, 56, 48, 25, 5, 57, 15, 55, 45, 34, 87, 82, 6, 36, 6, 87, 42, 98, 25, 28, 14, 83, 75], [83, 87, 2, 86, 50, 76, 98, 5, 63, 11, 67, 69, 40, 16, 83, 92, 76, 15, 89, 87, 37, 23, 84, 71, 28, 87, 48, 9, 19, 81, 66, 57, 21, 78, 62, 24, 100, 67, 95, 8, 47, 54, 4, 45, 58, 62, 40, 99, 80, 37]]
    start -> (2, 6)
    end -> (0, 15)

    Error (['right', 'right', 'right', 'right', 'right', 'up', 'up', 'right', 'right', 'right', 'right'], 404) should equal (['right', 'right', 'right', 'right', 'right', 'up', 'right', 'up', 'right', 'right', 'right'], 404)

    Notice I got 404 as the total but it is a different path than what you expect.

  • Custom User Avatar

    existingWires = """
    .S.
    ...
    .G.
    """.strip('\n')

    solution = """
    .S.
    .P.
    .G.
    """.strip('\n')

    isn't the below an equally valid solution?
    .S.
    P..
    .G.

    in both cases, G is two hops away from S (third one could also be ..P)

  • Custom User Avatar

    health in negative is not really valid. the problem should state that health should be 0 or > 0. If I had health 20 and damage 80, then resulting health should be capped to 0 (and not -60)!

  • Custom User Avatar

    duplicate! there are other similar JS problems.

  • Custom User Avatar

    WHile this is a good problem for an absolute beginner there could be cases where both the arguments are so large that the sum overflows Number.MAX_SAFE_INTEGER.

    say you pass Number.MAX_SAFE_INTEGER for both arguments, what would the result be?

  • Custom User Avatar

    the question is vague and allows people to change the question itself!

  • Custom User Avatar

    The idea of the exercise was a array of objects, not objects. This is an incorrect solution for the said problem as you changed the problem itself. The Kata should have caught this!

  • Custom User Avatar

    This is a 6kyu at most, definitely not 4kyu

  • Custom User Avatar

    After calculating all the averages, round the total down.

    that statement is misleading. Based on the tests, it appears that the itent was to calculate the sum of averages first, and THEN round the final sum down

  • Custom User Avatar

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

  • Custom User Avatar

    I didn't find any issue. I am in the process of learning JS (started just last week). I am also new to codewards and I put the middle vote to indicate the problem wasnt really hard.

    It was no way to say that problem was good or bad..

  • Custom User Avatar

    there is an issue when this test is run against python 2.7.6. However it works when I pick python 3.x

  • Custom User Avatar

    Please add test cases [JavaScript]

  • Loading more items...