Ad
  • Custom User Avatar

    should be fixed

  • Custom User Avatar

    Random tests have been added by latest fork

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Kata forked and updated here:

    https://www.codewars.com/kumite/656fb6c4f926c71e2819f269

    Notes:

    • Node version => 18.x
    • Test framework => chai
    • Random tests added
    • Sample tests added
    • Fixed tests now correctly validate outputs; previous tests would incorrectly pass
    • Description tweaked

    Kata author inactive, would appreciate review/approval

  • Default User Avatar

    Enjoyed this kata, nothing over indulged in the backworkings of obscure language properties. Just a straight problem that can be solved a variety of different ways. Well done

  • Custom User Avatar

    No random tests, making it very easy to hardcode a solution.

  • Custom User Avatar

    I understand by reading the discussion that all tiles need to make a consecutive sequence of pairs starting from 1. The description does not state clearly this. Moreover most tests return 'passed' with incorrect arrays (incorrect length or incorrect content) and tests messages are not informative enaugh.

  • Custom User Avatar

    Hi, it's not very clear.
    I had to see the tests cases in order to finish the kata.
    I didn't get any points :/
    The 7th test isn't really useful.

  • Custom User Avatar

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

  • Custom User Avatar
    1. Fails due to the duplicate couples. I will change the description to make this clear.

    2. Fails due to lack of sequence. The numbers should start with 1-1, 2-2, 3-3 ..... n/2-n/2

  • Custom User Avatar

    Any idea, why this fails:
    [ 1, 16, 19, 19, 9, 14, 4, 9, 16, 19, 7, 9, 14, 4, 19, 1, 1, 9, 7, 1 ]
    Is it not random enough (because of duplicates)? Then the description should be clearer

    Same with (no duplicates):
    [ 9, 2, 3, 6, 2, 16, 14, 18, 8, 8, 3, 7, 14, 6, 9, 10, 18, 7, 16, 10 ]

    Both fail on 7th test:
    The array is not correct :(

  • Custom User Avatar

    Happy to help! ^^

  • Custom User Avatar

    Thanks! Better than the one I just wrote :) I will use your instead.

  • Custom User Avatar

    Here's a quick explanation you can use if you wish:

    In the memory game, numbers are randomly placed face-down in a grid. Each turn, the player chooses a number to peek at, and then replace, face down. If they choose two of the same number in a row, those numbers are removed from the grid. The aim is to clear the board!
    
    Your job is to produce an array of pairs of numbers, placed in a random spot in the array.
    
  • Loading more items...