不积跬步无以至千里

不积小流无以成江海

LC-Reverse Linked List

方法1:(迭代) # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = No...

2018-02-28 16:55:03

阅读数:23

评论数:0

LC-Rotated Digits

class Solution(object): def rotatedDigits(self, N): """ :type N: int :rtype: int &...

2018-02-27 19:22:57

阅读数:62

评论数:0

LC-Degree of an Array

#coding:utf-8 import collections class Solution(object): def findShortestSubArray(self, nums): """ :ty...

2018-02-26 20:10:35

阅读数:20

评论数:0

LC-Minimum Distance Between BST Nodes

# Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None sel...

2018-02-22 15:24:47

阅读数:57

评论数:0

LC-Contains Duplicate

方法1: class Solution(object): def containsDuplicate(self, nums): """ :type nums: List[int] :...

2018-02-21 16:05:26

阅读数:42

评论数:0

LC-Relative Ranks

方法1: class Solution(object): def findRelativeRanks(self, nums): """ :type nums: List[int] :...

2018-02-20 17:16:21

阅读数:68

评论数:0

LC-Minimum Absolute Difference in BST

# Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None sel...

2018-02-19 21:23:34

阅读数:41

评论数:0

LC-Delete Node in a Linked List

# Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solut...

2018-02-18 17:49:47

阅读数:35

评论数:0

LC-Two Sum II - Input array is sorted

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

2018-02-17 16:17:27

阅读数:46

评论数:0

LC-First Unique Character in a String

class Solution(object): def firstUniqChar(self, s): """ :type s: str :rtype: int &...

2018-02-16 23:12:55

阅读数:40

评论数:0

LC-Valid Anagram

import collections class Solution(object): def isAnagram(self, s, t): """ :type s: str :type t...

2018-02-15 00:28:44

阅读数:39

评论数:0

LC-Assign Cookies

class Solution(object): def findContentChildren(self, g, s): """ :type g: List[int] :type s: L...

2018-02-14 21:57:14

阅读数:43

评论数:0

LC-Binary Tree Tilt

#code: utf-8 # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None...

2018-02-14 20:19:54

阅读数:37

评论数:0

LC-Sum of Left Leaves

# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # ...

2018-02-12 23:39:03

阅读数:41

评论数:0

LC-Same Tree

方法1: # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None...

2018-02-10 23:56:22

阅读数:38

评论数:0

LC-Roman to Integer

class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int &quo...

2018-02-09 23:10:07

阅读数:38

评论数:0

LC-Ransom Note

class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str ...

2018-02-08 21:36:12

阅读数:46

评论数:0

LC-Majority Element

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

2018-02-07 21:18:01

阅读数:32

评论数:0

LC-Best Time to Buy and Sell Stock II

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

2018-02-06 23:40:23

阅读数:33

评论数:0

LC-Intersection of Two Arrays

class Solution(object): def intersection(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List...

2018-02-05 16:41:46

阅读数:39

评论数:0

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