Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Do you guys know WHY it works??
This comment is hidden because it contains spoiler information about the solution
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
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?
This comment is hidden because it contains spoiler information about the solution
How does the value of is incremented?
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.
Read how filter works and what are falsy values. The if is returning char, not true.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution