上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页
摘要: #coding=utf-8# 解题思路:无 20190302 找工作期间class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, 阅读全文
posted @ 2019-03-17 14:26 AceKo 阅读(90) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路:排序 20190302 找工作期间class Solution: def findAnagrams(self, s, p): """ :type s: str :type p: str :rtype: List[int] """ from collection 阅读全文
posted @ 2019-03-17 14:26 AceKo 阅读(86) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路:快速排序 20190302 找工作期间# 关键点 index = partion(xx) ,index表示的是在整个数组中的位置class Solution(object): def findKthLargest(self, nums, k): """ :ty 阅读全文
posted @ 2019-03-17 14:25 AceKo 阅读(182) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路: 关键点:二分查找 20190302 找工作期间class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int 阅读全文
posted @ 2019-03-17 14:24 AceKo 阅读(89) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路:滑动窗口 (本质上是搜索剪支) 20190302 找工作期间class Solution(object): def minSubArrayLen(self, s, nums): """ :type s: int :type nums: List[int] :r 阅读全文
posted @ 2019-03-17 14:24 AceKo 阅读(93) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路: 无 20190302 找工作期间class Solution(object): def merge(self, nums1, m, nums2, n): """ :type nums1: List[int] :type m: int :type nums2: 阅读全文
posted @ 2019-03-17 14:23 AceKo 阅读(54) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路: 关键点:变量逻辑状态的定义 20190302 找工作期间class Solution(object): def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ i 阅读全文
posted @ 2019-03-17 14:22 AceKo 阅读(183) 评论(0) 推荐(0)
摘要: # 解题思路: 组合问题 20190302 找工作期间# (0,n)-> (a,b) 查找问题# 搜索树的 剪支 (0,n) -> [(0,n-1),(1,n)]#具体思路 :# 字典计数 然后判断搜索路径from collections import defaultdictclass Soluti 阅读全文
posted @ 2019-03-17 14:20 AceKo 阅读(75) 评论(0) 推荐(0)
摘要: #coding=utf-8# 解题思路: 三路排序法(借鉴快速排序的思想) 20190302 找工作期间class Solution(object): def sortColors(self, nums): """ :type nums: List[int] :rtype: void Do not 阅读全文
posted @ 2019-03-17 14:19 AceKo 阅读(79) 评论(0) 推荐(0)
摘要: # 解题思路: 无 20190302 找工作期间class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ k = 0 for 阅读全文
posted @ 2019-03-17 14:18 AceKo 阅读(113) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页