
[Leetcode] 46. Permutations
·
코딩테스트/Python
🔗 Problem Link Permutations - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com ❔Thinking 주어진 숫자들을 모두 활용해 만들 수 있는 수열을 리스트에 담아 반환한다. 💻Solution 1. 조합을 활용한 풀이 from itertools import permutations def permute(self, nums): return list(permutations(nums, len(nums))) 2. DFS를 활용한 풀이 - 반복문 def ..