摘要:
class Solution(object): def combine(self, n, k): """ :type n: int :type k: int :rtype: List[List[int]] """ self.res = [] if not n or k > n or k <= 0: 阅读全文
posted @ 2019-03-19 10:31
AceKo
阅读(141)
评论(0)
推荐(0)
摘要:
class Solution(object): def totalNQueens(self, n): """ :type n: int :rtype: """ self.col = [False for i in range(n)] self.diaS = [False for i in range 阅读全文
posted @ 2019-03-19 10:30
AceKo
阅读(154)
评论(0)
推荐(0)
摘要:
#coding=utf-8class Solution(object): def solveNQueens(self, n): """ :type n: int :rtype: List[List[str]] """ self.col = [False for i in range(n)] self 阅读全文
posted @ 2019-03-19 10:28
AceKo
阅读(158)
评论(0)
推荐(0)
摘要:
#coding=utf-8class Solution1(object): def permuteUnique(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ self.res = [] nums.sort() l 阅读全文
posted @ 2019-03-19 10:27
AceKo
阅读(360)
评论(0)
推荐(0)
摘要:
class Solution(object): def permute(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ pass self.res =[] length = len(nums) self.used 阅读全文
posted @ 2019-03-19 10:26
AceKo
阅读(125)
评论(0)
推荐(0)
摘要:
class Solution(object): def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ s 阅读全文
posted @ 2019-03-19 10:25
AceKo
阅读(298)
评论(0)
推荐(0)
摘要:
class Solution(object): def combinationSum(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ se 阅读全文
posted @ 2019-03-19 10:24
AceKo
阅读(132)
评论(0)
推荐(0)
摘要:
class Solution(object): def solveSudoku(self, board): """ :type board: List[List[str]] :rtype: void Do not return anything, modify board in-place inst 阅读全文
posted @ 2019-03-19 10:23
AceKo
阅读(264)
评论(0)
推荐(0)
摘要:
class Solution(object): def letterCombinations(self, digits): """ :type digits: str :rtype: List[str] """ self.letterMap = [ " ", "", "abc", "def", "g 阅读全文
posted @ 2019-03-19 10:20
AceKo
阅读(195)
评论(0)
推荐(0)
摘要:
class Solution(object): def findContentChildren(self, g, s): """ :type g: List[int] :type s: List[int] :rtype: int """ g.sort(reverse = True) s.sort(r 阅读全文
posted @ 2019-03-19 10:19
AceKo
阅读(124)
评论(0)
推荐(0)