Core Skill

Problems

Pattern

def dfs(path):
    if len(path) == len(nums):
        res.append(path[:])
        return
    
    for i in range(len(nums)):
        if used[i]: continue
        used[i] = True
        path.append(nums[i])
        
        dfs(path)
        
        path.pop()
        used[i] = False

Concepts