Merge pull request #129 from gdnlnsjd/master

更新 0046.全排列 java版本
This commit is contained in:
Carl Sun
2021-05-15 17:30:22 +08:00
committed by GitHub

View File

@ -149,6 +149,7 @@ public:
Java
```java
class Solution {
List<List<Integer>> result = new ArrayList<>();// 存放符合条件结果的集合
LinkedList<Integer> path = new LinkedList<>();// 用来存放符合条件结果
boolean[] used;
@ -167,9 +168,6 @@ class Solution {
return;
}
for (int i = 0; i < nums.length; i++){
// if (path.contains(nums[i])){
// continue;
// }
if (used[i]){
continue;
}