Ad
  • Custom User Avatar

    Same problem seems to appear in n=6, 14, 18, 22, 26, etc. (is there no test for n=10?)
    Its quite easy to adapt the solution so it still works, but might be better to fix it if possible.

  • Custom User Avatar

    Test for n = 4 is no more.

  • Custom User Avatar

    There is a bug in java production test.

    For n = 4 and greater even numbers properly result is:
    [1, 1, 1, 1]
    [0, 0, 0, 1]
    [1, 0, 0, 1]
    [1, 1, 1, 1]

    your test result:
    [1, 1, 1, 1]
    [0, 0, 0, 1]
    [1, .1., 0, 1]
    [1, 1, 1, 1]

    You are adding a one '1' too much, and it is necessary to remove last 1 from snake.