Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1bcd012

Browse files
update 46
1 parent5db9f12 commit1bcd012

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+3
-3
lines changed

‎src/main/java/com/fishercoder/solutions/_46.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public static class Solution1 {
1111
publicList<List<Integer>>permute(int[]nums) {
1212
List<List<Integer>>result =newArrayList();
1313
result.add(newArrayList<>());
14-
returnbacktracking(nums,0,result);
14+
returnrecursion(nums,0,result);
1515
}
1616

17-
privateList<List<Integer>>backtracking(int[]nums,intindex,List<List<Integer>>result) {
17+
privateList<List<Integer>>recursion(int[]nums,intindex,List<List<Integer>>result) {
1818
if (index ==nums.length) {
1919
returnresult;
2020
}
@@ -27,7 +27,7 @@ private List<List<Integer>> backtracking(int[] nums, int index, List<List<Intege
2727
}
2828
}
2929
result =newResult;
30-
returnbacktracking(nums,index +1,result);
30+
returnrecursion(nums,index +1,result);
3131
}
3232
}
3333

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp