上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: “”“解题思路:遍历数组,每次遍历记录数组最小值,并且用计算当前值和最小值之差为利润,记录最大的利润”“”class Solution(object): def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ 阅读全文
posted @ 2020-02-28 08:18 米开朗菠萝 阅读(114) 评论(0) 推荐(0)
摘要: # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None # 递归,中序遍 阅读全文
posted @ 2020-02-18 11:13 米开朗菠萝 阅读(87) 评论(0) 推荐(0)
摘要: #用二分查找法class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ first = 0 last = 阅读全文
posted @ 2020-02-11 17:13 米开朗菠萝 阅读(102) 评论(0) 推荐(0)
摘要: # 递归方法解决class Solution(object): def letterCombinations(self, digits): """ :type digits: str :rtype: List[str] """ d = {"2":"abc", "3":"def", "4":"ghi" 阅读全文
posted @ 2020-02-11 16:16 米开朗菠萝 阅读(88) 评论(0) 推荐(0)
摘要: class Solution(object): def isValid(self, s): """ :type s: str :rtype: bool """ stack = [] #存放符号 d = {"]": "[", ")":"(", "}":"{"} “”“ 判断符号是否是结束符号,如果是, 阅读全文
posted @ 2020-02-11 13:53 米开朗菠萝 阅读(72) 评论(0) 推荐(0)
摘要: class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str :rtype: int """ usedchar = {} #存储无重复得字符 max_length = start = 0 #初始化最长字 阅读全文
posted @ 2020-02-10 20:04 米开朗菠萝 阅读(107) 评论(0) 推荐(0)
摘要: 参考:https://www.laozuo.org/10825.html 阅读全文
posted @ 2019-04-30 19:58 米开朗菠萝 阅读(484) 评论(0) 推荐(0)
摘要: 参考:https://blog.csdn.net/xjmxym/article/details/73610648 阅读全文
posted @ 2019-04-30 19:22 米开朗菠萝 阅读(319) 评论(0) 推荐(0)
摘要: ModuleNotFoundError: No module named '_ctypes' 操作系统:centos7 阅读全文
posted @ 2019-04-30 19:06 米开朗菠萝 阅读(10306) 评论(0) 推荐(0)
摘要: 服务器版本:centos7 https://www.runoob.com/mysql/mysql-install.html 阅读全文
posted @ 2019-04-30 09:48 米开朗菠萝 阅读(95) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页