Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • $\begingroup$ @tavr, is this what you needed? $\endgroup$ Commented Feb 25, 2016 at 14:39
  • 2
    $\begingroup$ OP seems to want deleting minimal number of rows and columns possible (so in comment OP claims for 6X11 output, not 4X5). I.e. to choose order of deleting so as to eliminate maximum 0 during each iteration. IMHO $\endgroup$ Commented Feb 25, 2016 at 15:51
  • 2
    $\begingroup$ @garej is right. I need to delete the minimum number of rows and columns necessary to achieve a matrix with no zeros. So, for example, if you've already deleted a column containing a zero, there is no longer a need to delete the row that contained that zero (unless that row contained another zero). $\endgroup$ Commented Feb 25, 2016 at 16:26
  • $\begingroup$ @tavr Please add all necessary clarification in the question, as it is, is about to be closed for been unclear. $\endgroup$ Commented Feb 25, 2016 at 16:29
  • $\begingroup$ @tavr Ok, so now that implies there is more than one way of doing it. How do you define the correct way? Please edit and explain in your question $\endgroup$ Commented Feb 25, 2016 at 16:30