[Hacker Rank] Diagonal Difference (Javascript)
Difficulty Easy Language Javascript Problem (문제) Given a square matrix, calculate the absolute difference between the sums of its diagonals. 정사각형 행렬이 주어지면, 대각선의 합 사이의 절대 차이를 계산하세요. For example, the square matrix arr is shown below: 예를 들어, 정사각형 행렬 arr이 다음과 같다면: 1 2 3 4 5 6 7 8 9 The left-to-right diagonal = 1 + 5+ 9 = 15. The right-to-left diagonal = 3 + 5+ 9 = 17. Their absolute difference is |1..
Algorithms/Hacker Rank
2020. 9. 18. 17:48