Tap here to switch tabs
Problem
Submissions

Problem: Split Array into Consecutive Subsequences

Try to solve the Split Array into Consecutive Subsequences problem.

Statement

Given an integer array nums sorted in non decreasing order, determine if it is possible to partition nums into one or more subsequences such that:

  • Each subsequence is composed of consecutive increasing integers where each value is exactly 11 greater than the preceding value.

  • Every subsequence has a length of at least 33.

Return true if such a partition is possible, or false otherwise.

Constraints:

  • 1≤1 \leq nums.length ≤104\leq 10^4

  • −1000≤-1000 \leq nums[i] ≤1000\leq 1000

  • nums is sorted in non decreasing order.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Split Array into Consecutive Subsequences

Try to solve the Split Array into Consecutive Subsequences problem.

Statement

Given an integer array nums sorted in non decreasing order, determine if it is possible to partition nums into one or more subsequences such that:

  • Each subsequence is composed of consecutive increasing integers where each value is exactly 11 greater than the preceding value.

  • Every subsequence has a length of at least 33.

Return true if such a partition is possible, or false otherwise.

Constraints:

  • 1≤1 \leq nums.length ≤104\leq 10^4

  • −1000≤-1000 \leq nums[i] ≤1000\leq 1000

  • nums is sorted in non decreasing order.