0
Matrix diagonals
Hi, how can I loop the diagonals of the matrix in order to find out the maximum number of consecutive diagonals with the same number? Example 1 0 0 1 0 0 1 1 0 The number is 2 consecutives diagonals in this example.
3 Réponses
+ 1
Thank you Denise!!
+ 1
Your welcome :)
0
Here is an example how to print the diagonals of a matrix (n * n).
With this loops it should be possible to do your task.
https://code.sololearn.com/c315mfVKqbKR/?ref=app