打卡记录
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/e1f4bed739ee43668e07e17cc2b1f5f3.png)
寻找峰值 II(二分)
链接
class Solution:
def findPeakGrid(self, mat: List[List[int]]) -> List[int]:
l, r = 0, len(mat) - 1
while l < r:
mid = (l + r) // 2
mx = max(mat[mid])
if mx >= mat[mid + 1][mat[mid].index(mx)]:
r = mid
else:
l = mid + 1
return [l, mat[l].index(max(mat[l]))]