勇敢牛牛生活灿烂
勇敢牛牛生活灿烂
全部文章
分类
题解(16)
归档
标签
去牛客网
登录
/
注册
勇敢牛牛生活灿烂的博客
全部文章
(共18篇)
题解 | #编辑距离(一)#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param str1 string字符串 # @param str2 string字符串 #&nb...
Python3
2022-09-19
2
398
题解 | #最长不含重复字符的子字符串#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @return int整型 # class Solution: def lengthOfLongestSubstring(self , s: str) ...
Python3
动态规划
2022-05-23
0
384
题解 | #矩形覆盖#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param number int整型 # @return int整型 # class Solution: def rectCover(self , number: int) -> int...
Python3
动态规划
递归
2022-05-22
0
301
题解 | #礼物的最大价值#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param grid int整型二维数组 # @return int整型 # class Solution: def maxValue(self , grid: List[List[int]]...
Python3
动态规划
2022-05-19
0
350
题解 | #跳台阶扩展问题#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param number int整型 # @return int整型 # class Solution: def jumpFloorII(self , number: int) -> i...
Python3
动态规划
2022-05-17
0
347
题解 | #跳台阶#
# 动态规划 class Solution: def jumpFloor(self , number: int) -> int: # write code here dp = [0 for _ in range(number+1)] # dp[i] 表示...
Python3
动态规划
2022-05-17
0
320
题解 | #数字序列中某一位的数字#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param n int整型 # @return int整型 # class Solution: def findNthDigit(self , n: int) -> int: ...
Python3
模拟
2022-05-11
0
350
题解 | #旋转数组的最小数字#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param rotateArray int整型一维数组 # @return int整型 # class Solution: def minNumberInRotateArray(self , ...
Python3
二分查找
顺序查找
2022-05-09
0
314
题解 | #连续子数组的最大和#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param array int整型一维数组 # @return int整型 # class Solution: def FindGreatestSumOfSubArray(self , arr...
Python3
动态规划
2022-05-08
0
339
题解 | #数字在升序数组中出现的次数#
class Solution: def GetNumberOfK(self , data: List[int], k: int) -> int: # write code here first = self.GetFirstK(data, k) ...
Python3
二分查找
2022-05-07
0
285
首页
上一页
1
2
下一页
末页