Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bea7a4d

Browse files
refactor 1296
1 parent a89097f commit bea7a4d

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,6 @@
22

33
import java.util.TreeMap;
44

5-
/**
6-
* 1296. Divide Array in Sets of K Consecutive Numbers
7-
*
8-
* Given an array of integers nums and a positive integer k,
9-
* find whether it's possible to divide this array into sets of k consecutive numbers
10-
* Return True if its possible otherwise return False.
11-
*
12-
* Example 1:
13-
* Input: nums = [1,2,3,3,4,4,5,6], k = 4
14-
* Output: true
15-
* Explanation: Array can be divided into [1,2,3,4] and [3,4,5,6].
16-
*
17-
* Example 2:
18-
* Input: nums = [3,2,1,2,3,4,3,4,5,9,10,11], k = 3
19-
* Output: true
20-
* Explanation: Array can be divided into [1,2,3] , [2,3,4] , [3,4,5] and [9,10,11].
21-
*
22-
* Example 3:
23-
* Input: nums = [3,3,2,2,1,1], k = 3
24-
* Output: true
25-
*
26-
* Example 4:
27-
* Input: nums = [1,2,3,4], k = 3
28-
* Output: false
29-
* Explanation: Each array should be divided in subarrays of size 3.
30-
*
31-
* Constraints:
32-
* 1 <= nums.length <= 10^5
33-
* 1 <= nums[i] <= 10^9
34-
* 1 <= k <= nums.length
35-
* */
365
public class _1296 {
376
public static class Solution1 {
387
public boolean isPossibleDivide(int[] nums, int k) {

0 commit comments

Comments
 (0)