源式羽语

有志于学,不赞美,不责难,只求了解认识。

128. Longest Consecutive Sequence

class Solution(object):     def longestConsecutive(self, nums):         """         :type nums: List[int]         :rtype: int    ...

2017-06-06 17:14:32

阅读数:132

评论数:0

57. Insert Interval

# Definition for an interval. # class Interval(object): #     def __init__(self, s=0, e=0): #         self.start = s #         self.end = e ...

2017-06-06 17:06:35

阅读数:112

评论数:0

55. Jump Game

class Solution(object):     def canJump(self, nums):         """         :type nums: List[int]         :rtype: bool         "...

2017-06-06 17:02:52

阅读数:90

评论数:0

45. Jump Game II

class Solution(object):     def jump(self, nums):         """         :type nums: List[int]         :rtype: int         "&qu...

2017-06-06 17:00:09

阅读数:97

评论数:0

229. Majority Element II

class Solution(object):     def majorityElement(self, nums):         """         :type nums: List[int]         :rtype: List[int] ...

2017-06-06 16:55:07

阅读数:117

评论数:0

380. Insert Delete GetRandom O(1)

class RandomizedSet(object):     def __init__(self):         """         Initialize your data structure here.         "&q...

2017-06-06 16:39:42

阅读数:107

评论数:0

414. Third Maximum Number

找第3个大的数 class Solution(object):     def thirdMax(self, nums):         """         :type nums: List[int]         :rtype: int         &q...

2017-06-06 16:17:27

阅读数:96

评论数:0

Max Consecutive Ones

找出1的最大连续个数 class Solution(object):     def findMaxConsecutiveOnes(self, nums):         """         :type nums: List[int]         ...

2017-06-06 16:07:24

阅读数:86

评论数:0

565. Array Nesting

class Solution(object):     def arrayNesting(self, nums):         """         :type nums: List[int]         :rtype: int         &...

2017-06-06 15:26:58

阅读数:191

评论数:0

216Combination Sum III

class Solution(object):     def combinationSum3(self, k, n):         """         :type k: int         :type n: int         :rtype...

2017-06-01 15:19:23

阅读数:94

评论数:0

122. Best Time to Buy and Sell Stock II

class Solution(object):     def maxProfit(self, prices):         """         :type prices: List[int]         :rtype: int         ...

2017-05-25 11:52:01

阅读数:225

评论数:0

121Best Time to Buy and Sell Stock

class Solution(object):     def maxProfit(self, prices):         """         :type prices: List[int]         :rtype: int         ...

2017-05-25 10:43:40

阅读数:119

评论数:0

79. Word Search

class Solution(object): def exist(self, board, word): """ :type board: List[List[str]] :type word: str ...

2017-05-22 15:47:58

阅读数:110

评论数:0

566. Reshape the Matrix

class Solution(object):     def matrixReshape(self, nums, r, c):         """         :type nums: List[List[int]]         :type r: ...

2017-05-22 14:32:32

阅读数:152

评论数:0

54. Spiral Matrix

class Solution(object):     def spiralOrder(self, matrix):         """         :type matrix: List[List[int]]         :rtype: List[...

2017-05-19 17:08:40

阅读数:173

评论数:0

Combination Sum II

class Solution(object):     def combinationSum2(self, candidates, target):         """         :type candidates: List[int]        ...

2017-05-19 16:21:39

阅读数:85

评论数:0

39. Combination Sum

class Solution(object):     def combinationSum(self, candidates, target):         """         :type candidates: List[int]         ...

2017-05-19 16:01:03

阅读数:91

评论数:0

34. Search for a Range

class Solution(object):     def searchRange(self, nums, target):         """         :type nums: List[int]         :type target: i...

2017-05-19 11:34:23

阅读数:135

评论数:0

35. Search Insert Position

class Solution(object):     def searchInsert(self, nums, target):         """         :type nums: List[int]         :type target: ...

2017-05-19 10:10:16

阅读数:107

评论数:0

leetcode442 Find All Duplicates in an Array

解题思路:将值转化为下表,用值记录个数 代码来自:https://leetcode.com/problems/find-all-duplicates-in-an-array/#/description https://leetcode.com/problems/find-all-duplica...

2017-05-17 15:05:34

阅读数:129

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭