oops missed Space Complexity

On Fri, Sep 2, 2011 at 12:55 PM, kranthi raj <kranthi...@gmail.com> wrote:

> for( i = 0 ; i < n ; ++i )
>    for( j = 0 ; j < m ; ++j )
>        if( a[i][j] != 0 )
>             row[j]=col[i]=1;
>
>
>
> for( i = 0 ; i < n ; ++i )
>    for( j = 0 ; j < m ; ++j )
>
>        {
>            if (row[j]==1 || col[i]==1)
>                  a[i][j]=1;
>        }
>
>
>
> Does this work?
>



-- 
   Sincerely,
    Kranthi Raj A
    2nd Mtech
    Dept Of Computer Science ,
    Indian Institute of Technology, Madras
   #9884989577

-- 
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