Skip to content

Commit e01318a

Browse files
refactor 1282
1 parent 28f43d4 commit e01318a

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

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

-23
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,6 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
/**
9-
* 1282. Group the People Given the Group Size They Belong To
10-
*
11-
* There are n people whose IDs go from 0 to n - 1 and each person belongs exactly to one group.
12-
* Given the array groupSizes of length n telling the group size each person belongs to, return the groups there are and the people's IDs each group includes.
13-
* You can return any solution in any order and the same applies for IDs.
14-
* Also, it is guaranteed that there exists at least one solution.
15-
*
16-
* Example 1:
17-
* Input: groupSizes = [3,3,3,3,3,1,3]
18-
* Output: [[5],[0,1,2],[3,4,6]]
19-
* Explanation:
20-
* Other possible solutions are [[2,1,6],[5],[0,4,3]] and [[5],[0,6,2],[4,3,1]].
21-
*
22-
* Example 2:
23-
* Input: groupSizes = [2,1,3,3,3,2]
24-
* Output: [[1],[0,5],[2,3,4]]
25-
*
26-
* Constraints:
27-
* groupSizes.length == n
28-
* 1 <= n <= 500
29-
* 1 <= groupSizes[i] <= n
30-
* */
318
public class _1282 {
329
public static class Solution1 {
3310
public List<List<Integer>> groupThePeople(int[] groupSizes) {

0 commit comments

Comments
 (0)