http://www.geeksforgeeks.org/archives/6257
On Mon, Sep 12, 2011 at 10:29 AM, nishaanth <[email protected]> wrote: > @Neha.. This problem can be solved by DP. Create an auxiliary matrix C[][] > . C[i][j] would give the maximum size sub matrix with C[i][j] as the right > bottom entry. now the DP eqn is > > if M[i][j] == 1 > > C[i][j] = min(c[i-1][j],c[i][j-1],c[i-1][j-1])+1 > > else > > c[i][j] = 0 > > Now take the maximum c[i][j] entry in the matrix. > > Hope it helps. > > > On Mon, Sep 12, 2011 at 10:07 AM, tech coder <[email protected]>wrote: > >> this is possible in o(n^2) with n^2 addidtional space . >> >> >> On Sun, Sep 11, 2011 at 11:33 AM, Neha Singh >> <[email protected]>wrote: >> >>> @victor: Can u provide the algo ?? >>> >>> -- >>> 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. >>> >> >> -- >> 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. >> > > > > -- > S.Nishaanth, > Computer Science and engineering, > IIT Madras. > > -- > 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. > -- Regards , P Veera Reddy Devagiri Senior Under Graduate Computer Science and Engineering IIIT Hyderabad Mobile no-+91-9492024783 -- 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.
