@Teja Bala

U dont need the last line for a[0][0]

else code will be wrong

conside

0 0 0 0 1
0 0 0 0 0
0 1 0 0 0
0 0 0 1 0

Regards


On Sun, Sep 11, 2011 at 11:56 PM, teja bala <pawanjalsa.t...@gmail.com>wrote:

> //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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to