会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
米开朗菠萝
星星的孩子
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
4
5
6
7
8
9
10
11
12
···
14
下一页
2020年2月28日
121. Best Time to Buy and Sell Stock
摘要: “”“解题思路:遍历数组,每次遍历记录数组最小值,并且用计算当前值和最小值之差为利润,记录最大的利润”“”class Solution(object): def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """
阅读全文
posted @ 2020-02-28 08:18 米开朗菠萝
阅读(114)
评论(0)
推荐(0)
2020年2月18日
94. Binary Tree Inorder Traversal
摘要: # 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)
2020年2月11日
34. Find First and Last Position of Element in Sorted Array
摘要: #用二分查找法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)
17. Letter Combinations of a Phone Number
摘要: # 递归方法解决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)
20. Valid Parentheses
摘要: class Solution(object): def isValid(self, s): """ :type s: str :rtype: bool """ stack = [] #存放符号 d = {"]": "[", ")":"(", "}":"{"} “”“ 判断符号是否是结束符号,如果是,
阅读全文
posted @ 2020-02-11 13:53 米开朗菠萝
阅读(72)
评论(0)
推荐(0)
2020年2月10日
3. Longest Substring Without Repeating Characters
摘要: 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)
2019年4月30日
解决CentOS7编译python出现"zipimport.ZipImportError"错误问题
摘要: 参考:https://www.laozuo.org/10825.html
阅读全文
posted @ 2019-04-30 19:58 米开朗菠萝
阅读(484)
评论(0)
推荐(0)
yum报错:line 30 except KeyboardInterrupt, e: Syntax Error: invalid syntax
摘要: 参考:https://blog.csdn.net/xjmxym/article/details/73610648
阅读全文
posted @ 2019-04-30 19:22 米开朗菠萝
阅读(319)
评论(0)
推荐(0)
linux 安装python3.7 报错No module named '_ctypes'
摘要: ModuleNotFoundError: No module named '_ctypes' 操作系统:centos7
阅读全文
posted @ 2019-04-30 19:06 米开朗菠萝
阅读(10306)
评论(0)
推荐(0)
linux下mysql的安装
摘要: 服务器版本: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
下一页
公告