Suggestions on Areas of Improvement are welcomed

My approach:

void Solution::setZeroes(vector<vector > &A)
{
int r = A.size(); //numbr of rows
int c = A[0].size(); //num of columns
//here we check for zeros
bool row_flag = false;
bool col_flag = false;

for(int i=0;i<r;i++)
{
    for(int j=0;j<c;j++)
    {
        if(i == 0 && A[i][j] == 0)
            row_flag = true;
        
        if(j == 0 && A[i][j] == 0)
            col_flag = true;
            
        if(A[i][j] == 0)
        {
            A[i][0] = 0;
            A[0][j] = 0;
        }
    }
}

//set accordingly zeros
for(int i=1;i<r;i++)
{
    for(int j=1;j<c;j++)
    {
        if(A[i][0] == 0 || A[0][j] == 0)
        {
            A[i][j] = 0;
        }
    }
}

if(row_flag)
    for(int i=0;i<c;i++)
        A[0][i] = 0;

if(col_flag)
    for(int i=0;i<r;i++)
        A[i][0] = 0 ;

}

Click here to start solving coding interview questions