littlemuggle
littlemuggle
全部文章
题解
归档
标签
去牛客网
登录
/
注册
littlemuggle的博客
全部文章
/ 题解
(共3篇)
题解 | #寻找峰值#
用二分法解,注意mid的取值和left和right的关系 class Solution: def findPeakElement(self , nums: List[int]) -> int: # write code here num_length =...
Python3
二分查找
2022-04-29
0
368
题解 | #二维数组中的查找#
一维查找的延伸,注意边界条件 class Solution: def Find(self , target: int, array: List[List[int]]) -> bool: # write code here m = len(array) ...
Python3
二分查找
2022-04-28
0
312
题解 | #二分查找-I#
二分查找法,定义start和end作为搜索范围,根据start和end来确定index class Solution: def search(self , nums: List[int], target: int) -> int: # write code here ...
Python3
二分查找
2022-04-28
2
375