From 1ae78a86ca73cf229acbbfe8fa6d16a505814e34 Mon Sep 17 00:00:00 2001 From: hitorig <86967184+hitorig@users.noreply.github.com> Date: Fri, 6 Aug 2021 17:43:34 +0800 Subject: [PATCH] =?UTF-8?q?Update=200046.=E5=85=A8=E6=8E=92=E5=88=97.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0046.全排列.md | 39 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/problems/0046.全排列.md b/problems/0046.全排列.md index 3ee7271e..3b3ba180 100644 --- a/problems/0046.全排列.md +++ b/problems/0046.全排列.md @@ -227,24 +227,27 @@ class Solution: Go: ```Go -var result [][]int -func backtrack(nums,pathNums []int,used []bool){ - if len(nums)==len(pathNums){ - tmp:=make([]int,len(nums)) - copy(tmp,pathNums) - result=append(result,tmp) - //result=append(result,pathNums) - return - } - for i:=0;i