可能显示的文件:
Given a 2d array sorted in increasing order from left to right and top to bottom, what is the best way to search for a target number?
Search a sorted 2D matrix算法:搜索二维整数数组中的整数的有效方法?
甲时间效率的程序,找出在二维矩阵的元素,行和列,其中的单调递增。 (行和列从上到下和从左到右增加)。
我只能想到二进制搜索,如果二维数组排序。
即使单调增加而不是排序,也可以进行二进制搜索,但正如指出的那样,有更好的方法可以继续。 – 2010-08-13 14:03:46