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.
the error comes from your code: wrong index calculation, so you access invalid memory
should be:
(you forgot the + 1 for the nul terminator, and you got the pointer arithmetic wrong:
ptr + n
will addn * sizeof *ptr
toptr
, so you were going out-of-bounds ofpins
. The cast tochar *
needs to happen right away, in order to have byte-level memory access.)I do understand that, but 658 is one of the variations and that has the same pattern as 325. 6 and 8 are adjacent diagonally, but that is a valid solution
See the keypad again, 3 and 5 are adjacent, but diagonally.
Hello, just trying to understand the variations.
For this test example: "369": ["339","366","399","658","636","258","268","669","668","266","369","398","256","296","259","368","638","396","238","356","659","639","666","359","336","299","338","696","269","358","656","698","699","298","236","239"], how come 222 and 333 are not variations? Or 555? Or 325? But I see that 666 is there?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution