Skip to content

Instantly share code, notes, and snippets.

View ChongyeWang's full-sized avatar

Chongye Wang ChongyeWang

View GitHub Profile
class Solution(object):
def permute(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
result = []
temp = []
self.backtracking(result, temp, nums)
return result
class Solution(object):
class Solution(object):
def combinationSum(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
res = []
temp = []
class Solution(object):
def combinationSum2(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
candidates = sorted(candidates)
result = []
temp = []