You have to check if the digits are sequential, not if they are ordered. Made the same mistake and had to think about some time to get it.
It needs to be done manually, done.
solutions that do not pass the current tests - should be removed or marked as outdated. Maybe.
Yes. Read all the other comments. The kata had a "bug" back then.
This would fail the current set of unit tests.
Because the kata was changed after this was made. See the comments below.
I failed this solution because of overflow!
... Read comments below.
Also see (and upvote) this issue report: https://www.codewars.com/kata/5324945e2ece5e1f32000370/discuss#57ab495972292d35480001c7
The new test cases showed this solution with overflow error and number format error
This comment is hidden because it contains spoiler information about the solution
I don't know where you are from, but where I'm from, neither 7540 nor 1590 have sequential digits! ;-)
7540
1590
It's not just incrementing or decrementing, it's incrementing or decrementing sequential digits. So, 1234 is valid, but 1357 isn't.
1234
1357
Good Luck!
Don't understand why 7540 and 1590 are boring? First number passed decrementing criteria, second - incrementing.
MMMAAANNN, thx, great hint!!
In this kata, closing brace may be ")", "}", or "]" . . .
Hint: you can use console.log() to see the input string for each test.
console.log()
Loading collection data...
You have to check if the digits are sequential, not if they are ordered. Made the same mistake and had to think about some time to get it.
It needs to be done manually, done.
solutions that do not pass the current tests - should be removed or marked as outdated. Maybe.
Yes. Read all the other comments.
The kata had a "bug" back then.
This would fail the current set of unit tests.
Because the kata was changed after this was made. See the comments below.
I failed this solution because of overflow!
... Read comments below.
Also see (and upvote) this issue report: https://www.codewars.com/kata/5324945e2ece5e1f32000370/discuss#57ab495972292d35480001c7
The new test cases showed this solution with overflow error and number format error
This comment is hidden because it contains spoiler information about the solution
I don't know where you are from, but where I'm from, neither
7540
nor1590
have sequential digits! ;-)It's not just incrementing or decrementing, it's incrementing or decrementing sequential digits. So,
1234
is valid, but1357
isn't.Good Luck!
Don't understand why 7540 and 1590 are boring?
First number passed decrementing criteria, second - incrementing.
MMMAAANNN, thx, great hint!!
In this kata, closing brace may be ")", "}", or "]" . . .
Hint: you can use
console.log()
to see the input string for each test.Loading more items...