非常巧妙的解法:从矩阵的左下角出发,如果比target小则右移,如果比target大则上移,直至找到target或者出界。
这个方法可以用到所有基于这种矩阵的题目,比如373和378,就是配合二分法可以得到更高效的解。
GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — LeetCode/Others/240.Search-a-2D-Matrix-II at master · wisdompeak/LeetCode Expand file tree/ Copy path240.Search-a-2D-Matrix-II/Directory actionsMore optionsMore optionsDirectory actionsMore optionsMore options/ Copy path240.Search-a-2D-Matrix-II/Folders and files
非常巧妙的解法:从矩阵的左下角出发,如果比target小则右移,如果比target大则上移,直至找到target或者出界。 这个方法可以用到所有基于这种矩阵的题目,比如373和378,就是配合二分法可以得到更高效的解。 | |||||||||||||||||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | |||||||||||||||||||||