Back to Topic List
Hi Kevin,
I have already solved successfully the other two Conway's game (2D grid, 3D grid), but I have a problem with this hexagonal grid type. I tried two different representations of a hexagonal grid with different addressing method and both of them gave me the following results for the 2-cases example in the problem description:
Example: 2 6 5 2 000110000000101110001101001110 18 17 16 001011011100110000100010010101011010011101100000110111000000101000010011011001001100101110111101011000011001101001011101010010111010100010101100000110000110011101111110011000011110000000111100010100100010010000011110111111111100001101101111100100100001100101100100111001000010000100110001000101110010000001
Expected answers: 8 17
My answers (with both of my solution): 8 33
I checked first case of the example step-by-step and it is the same as your detailed one in the problem description but the second case differs.
May I ask you to check my solution (or yours)? Maybe you spot the problem in a second.
Thank you advance, Best regards
Hi Adam!
You're correct that there was a bug, and it was by some sort of luck that the first testcase still produced the correct answer! Either way the second testcase now matches your answer, so hopefully that should be the only issue - thanks!