## Diagonal difference in Java

Problem: Given a square matrix of size N×N, calculate the absolute difference between the sums of its diagonals. This question was asked in HackerRank. We will see a simple and elegent …

Problem: Given a square matrix of size N×N, calculate the absolute difference between the sums of its diagonals. This question was asked in HackerRank. We will see a simple and elegent …

Problem: Given a matrix of -1’s and 0’s, display matrix which contains minimum distance to reach nearest 0 for that particular position. Example: Input matrix: -1 0 -1 -1 -1 …

Problem: Write a program in Java for matrix multiplication. This program is a college level program. This program is asked in entry level interviews to see if you can handle …

In this article we will see how to transpose a matrix in Java. This is an algebra problem and asked in entry level interviews. Transpose matrix is similar to rotating …

Problem: Rotate matrix by 90 degrees. In this article we will see how to rotate a matrix by 90 degrees to right. This program is asked in programming interviews. …