//pseudo code dis will work for sure.....
for(i=0;i<row_count;i++)
for(j=0;j<column_count;j++)
{
if (a[i][j] == 1)
{
a[i][0] = 1;
a[0][j] = 1;
}
}
for(i=1;i<row_count;i++)
for(j=1;j<column_count;j++)
{
if (a[0][j] == 1 || a[i][0] == 1)
{
a[i][j] = 1;
}
]
if (a[0][0] == 1)
{
for (i=0;i<row_count;i++)
{
a[i][0] = 1;
}
for (i=0;i<column_count;i++)
{
a[0][i] = 1;
}
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.