https://leetcode.com/problems/permutations 주어진 배열에 있는 숫자들로 순열(조합 X) 만들기 public List<List<Integer>> permute(int[] nums) { List<List<Integer>> result = new ArrayList<>(); List<Integer> path = new ArrayList<>(); boolean[] used = new boolean[nums.length]; dfs(nums, path, used, result); return result; } private void dfs(int[] nums, List<Integer> path, boolean[] used, List<List<Integer>> result) { if (path.size() == nums.length) { result.add(new ArrayList<>(path)); return; } for (int i = 0; i <...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with List
Contact List, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack