Interesting little problem . I think that implementing technique suggested by deanhystad can quite easily deliver expected results.
Just additional suggestion: you can try to solve this only for outer line/circle and if you got it then it should be relatively easy to apply the same logic to inner lines/circles as well. Just another hint for finding solution (indices of outer line values of 5 x 5 matrix):
Just additional suggestion: you can try to solve this only for outer line/circle and if you got it then it should be relatively easy to apply the same logic to inner lines/circles as well. Just another hint for finding solution (indices of outer line values of 5 x 5 matrix):
[0, 0], [0, 1], [0, 2], [0, 3], [0, 4] [1, 0] [1, 4] [2, 0] [2, 4] [3, 0] [3, 4] [4, 0], [4, 1], [4, 2], [4, 3], [4, 4]If you use 2D list (matrix) for solution then you should built one with dummy values before you assign values using indices. Otherwise you will get index error.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.