Ad
  • Custom User Avatar

    Do you guys know WHY it works??

  • Custom User Avatar

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

  • Custom User Avatar

    Hi,

    Not an issue, a question. ;) (the kata is working fine and as expected)

    Your code is creating too much objects in memory => you'll have to work on that (check that you don't go in some cases in an infinite loop creating bigger and bigger arrays, for example)

    Cheers

    edit: not infinite loop related: just don't create the whole triangle: you'll get tests with arround 150000 levels

  • Default User Avatar

    I am receiving an error when passing all the tests:

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
    Aborted (core dumped)
    Exit code 134

    There doesn't seem to be much explanation at all on google
    Any suggestions?

  • Custom User Avatar

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

  • Custom User Avatar

    How does the value of is incremented?

  • Custom User Avatar

    The criterya of evenedd wasn't "if the number is pair or odd"? If is this, there should be only test cases where only one number is the different: 1 pair and all the rest odd and vice versa. But it's not the case. There is this test case for example :
    [ '8',
    '8',
    '9',
    '6',
    '6',
    '6',
    '5',
    '1',
    '1',
    '4',
    '8',
    '8',
    '2',
    '9',
    '2',
    '1',
    '8',
    '7',
    '2',
    '1',
    '8',
    '8',
    '8',
    '2',
    '0',
    '3',
    '0',
    '4',
    '8',
    '2',
    '9',
    '0',
    '1',
    '0',
    '0',
    '2',
    '4',
    '4',
    '6' ]

    where the different is the fourth. BUT WHY? it's pair and there's dozens of other pairs. I don't see any other relation among the number that could justify the fourth to be the different too.

  • Custom User Avatar

    Read how filter works and what are falsy values. The if is returning char, not true.

  • Custom User Avatar

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

  • Custom User Avatar

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