If zero found in Matrix. make entire row & column zero Problem is - If in an MxN matrix, a zero is encountered, the entire row and entire column should be set to zero.

Example -

8   4   2
2   3   7
1   0   1
9   8   4


Should become:

8   0   2
2   0   7
0   0   0
9   0   4


I encountered this problem today and came up with a solution.
I'm hoping for some feedback regarding the time/space complexity and how efficient my solution is :

Code - 

 public static void zeroMatrix(int[][] arr1)
{
    ArrayList&lt;Integer&gt; coord = new ArrayList&lt;&gt;();

    int row = arr1.length; 
    int column = arr1[0].length;
    for(int i=0; i &lt; row; i++)
    {
        for(int j=0; j &lt; column; j++)
        {
            if(arr1[i][j]==0)
            { 
                coord.add((10*i) + j);
            }       
        }
    }

    for(int n : coord)
    {
         int j=n%10;
         int i=n/10; int k=0;
        int l=0;
        while(k&lt;row)
        {
            arr1[k][j]=0;
            k++;
        }
        while(l&lt;column)
        {
            arr1[i][l]=0;
            l++;
        }
    }
}


What I'm doing is:


Saving the coordinates of found zeroes in an ArrayList as a two
digit integer. 
Taking out ones and tens places from the stored
list (which are the coordinates) and running a loop over the found
zeroes only.
Then making the corresponding rows and columns 0
Implementation

You did it right that you first find the zero entries and only after that set the rows/columns to zero. However, you can come up with more cohesive and flexible code:

public static void zeroMatrix(final int[][] matrix) {
    findZeroEntries(matrix).forEach((p) -&gt; { 
        setToZero(matrix, p.x, p.y); 
    });
}

private static List&lt;Point&gt; findZeroEntries(final int[][] matrix) {
    final int height = matrix.length; 
    final int width  = matrix[0].length;
    final List&lt;Point&gt; zeroEntryList = new ArrayList&lt;&gt;();

    for (int y = 0; y &lt; height; ++y) {
        for (int x = 0; x &lt; width; ++x) {
            if (matrix[y][x] == 0) {
                zeroEntryList.add(new Point(x, y));
            }
        }
    }

    return zeroEntryList;
}

private static void setToZero(final int[][] matrix, 
                              final int x, 
                              final int y) {
    setRowToZero(matrix, y);
    setColumnToZero(matrix, x);
}

private static void setRowToZero(final int[][] matrix, final int y) {
    final int width = matrix[0].length;

    for (int x = 0; x &lt; width; ++x) {
        matrix[y][x] = 0;
    }
}

private static void setColumnToZero(final int[][] matrix, final int x) {
    final int height = matrix.length;

    for (int y = 0; y &lt; height; ++y) {
        matrix[y][x] = 0;
    }
}


Coding conventions

Braces

What comes to braces, the recommended way to write them is to put the opening brace ({) on the same row with the statement that belongs to it. Instead of

for (...) 
{
    ...
}


you should write 

for (...) {
    ...
}


Spaces

For the sake of readability, you should have a single space character after each for and if, and a single space character before and after any binary operator. So instead of

for(int i=0; ...) {
    if(i==1) {

    }
}


you should have

for (int i = 0; ...) {
    if (i == 1) {
        ...
    }
}


Program to interface

Not that it makes much difference in your method, but usually the rule goes that people should program to an interface, and not to an implementation. So instead of

ArrayList&lt;Integer&gt; coord = new ArrayList&lt;&gt;();


you should write

List&lt;Integer&gt; coord = new ArrayList&lt;&gt;();


Naming

arr1 is not the best possible name. Why not use, say, matrix?

Also

int row = arr1.length; 
int column = arr1[0].length;


above I would have used the plural form:

int rows = arr1.length; 
int columns = arr1[0].length;


Zero entry coordinates

As @200_success mentioned, packing the coordinates the way you do is not a good idea.

Hope that helps.