一个mxn的矩阵,每一行、每一列都是ascending sorted array。求一个在这样的矩阵 里的查找算法. Need O(n) algorithm. (this one is hard, I did not get it, hope some bigbull can give some hints).
The search algorithm is as follows:
Search(Y[1,...,m;1,...,n],x) If Y[m,1]==x, return (m,1) else if xelse return Search [1,...,m,2,...,n],x)