Oh thanks! I was very surprised when I saw the solution to this problem, and you explained everything to me
@RAMII197805295 ай бұрын
For some reason I thought when there was a match you took the number from the diagonal (i - 1 and j - 1). Edit: The code does it right, it was the visual that was confusing.