Skip to content

Commit ff5c33d

Browse files
refactor 914
1 parent b787dd1 commit ff5c33d

File tree

1 file changed

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

1 file changed

+0
-33
lines changed

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

-33
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,6 @@
33
import java.util.HashMap;
44
import java.util.Map;
55

6-
/**
7-
* 914. X of a Kind in a Deck of Cards
8-
*
9-
* In a deck of cards, each card has an integer written on it.
10-
* Return true if and only if you can choose X >= 2 such that it is possible to split the entire deck into 1 or more groups of cards, where:
11-
* Each group has exactly X cards.
12-
* All the cards in each group have the same integer.
13-
*
14-
* Example 1:
15-
* Input: [1,2,3,4,4,3,2,1]
16-
* Output: true
17-
* Explanation: Possible partition [1,1],[2,2],[3,3],[4,4]
18-
*
19-
* Example 2:
20-
* Input: [1,1,1,2,2,2,3,3]
21-
* Output: false
22-
* Explanation: No possible partition.
23-
*
24-
* Example 3:
25-
* Input: [1]
26-
* Output: false
27-
* Explanation: No possible partition.
28-
*
29-
* Example 4:
30-
* Input: [1,1]
31-
* Output: true
32-
* Explanation: Possible partition [1,1]
33-
*
34-
* Example 5:
35-
* Input: [1,1,2,2,2,2]
36-
* Output: true
37-
* Explanation: Possible partition [1,1],[2,2],[2,2]
38-
*/
396
public class _914 {
407
public static class Solution1 {
418
public boolean hasGroupsSizeX(int[] deck) {

0 commit comments

Comments
 (0)