See the first row and first column and count the negative entries. Also let k be the number of negatives in first row and l be in first column. now remove the first row and column and recurse on th the top left k x l matrix that remains assuming that top left is minimum and increases on going right or down.
-- -------------------------------------------------- Rohit Saraf Second Year Undergraduate, Dept. of Computer Science and Engineering IIT Bombay http://www.cse.iitb.ac.in/~rohitfeb14 -- 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.
