Hackerrank Solutions
Easy
Array Matrix (Diagonal Difference)
Given a square matrix, calculate the absolute difference between the sums of its diagonals.
function diagonalDifference(arr) {
// arr eg: [ [ 11, 2, 4 ], [ 4, 5, 6 ], [ 10, 8, -12 ] ]
const arrLength = arr.length