I'm using Java. I have an assignment where we make a program that checks for the solvability of a grid. It works the same way as an 8 tile puzzle however the size of the grid can differ. A grid is valid if every row has the same number of columns and every column has the same number of rows. My question is what would you write so that the program can know if the grid is valid?

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now