Skip to content

Commit 8431b9d

Browse files
refactor 78
1 parent 73d21c3 commit 8431b9d

File tree

1 file changed

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

1 file changed

+3
-21
lines changed

src/main/java/com/fishercoder/solutions/_78.java

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
/**
7-
* 78. Subsets
8-
*
9-
* Given a set of distinct integers, nums, return all possible subsets.
10-
* Note: The solution set must not contain duplicate subsets.
11-
12-
For example,
13-
If nums = [1,2,3], a solution is:
14-
[
15-
[3],
16-
[1],
17-
[2],
18-
[1,2,3],
19-
[1,3],
20-
[2,3],
21-
[1,2],
22-
[]
23-
]
24-
*/
25-
266
public class _78 {
277

288
public static class Solution1 {
@@ -47,7 +27,9 @@ public List<List<Integer>> subsets(int[] nums) {
4727
}
4828

4929
public static class Solution2 {
50-
/**This is the most straightforward solution and easy to follow.*/
30+
/**
31+
* This is the most straightforward solution and easy to follow.
32+
*/
5133
public List<List<Integer>> subsets(int[] nums) {
5234
List<List<Integer>> result = new ArrayList();
5335
backtracking(result, new ArrayList(), nums, 0);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy