Sunday, May 23, 2010

Return all negative numbers in a matrix

2D Matrix(n * n) of positive and negative numbers is given. Matrix is sorted rowwise and columnwise. You have to return the count of -ve numbers in most optimal way.

No comments:

Post a Comment