- 1

To find if a matrix is identity or not.

A SQUARE MATRIX is an IDENTITY MATRIX when the elements of only one DIAGONAL (generally L—R diagonal, whose index numbers are same) are 1 and the rest is 0. My input is 1 0 0 0 1 0 0 0 1. The output is "Not an identity matrix". https://code.sololearn.com/cizW6280x13K/?ref=app

2nd May 2020, 2:13 PM
Tipu Sultan
Tipu Sultan - avatar
3 Answers
0
Thank you
2nd May 2020, 2:48 PM
Tipu Sultan
Tipu Sultan - avatar
0
And why is that? What's the problem with freeing up the memory after reading the array?
2nd May 2020, 2:57 PM
Tipu Sultan
Tipu Sultan - avatar