Problem
Submissions

Problem: Divide Array Into Increasing Sequences

Statement

Given a sorted integer array, nums, in non-decreasing order and an integer, k, determine whether it is possible to partition the array into one or more disjoint increasing subsequences, each having a length of at least k. Return true if such a partition exists; otherwise, return false.

Constraints:

  • 1≤1 \leq k ≤\leq nums.length≤103\leq 10^3

  • 1≤1 \leq nums[i] ≤103\leq 10^3

  • The nums array is sorted in non-decreasing order.

Problem
Submissions

Problem: Divide Array Into Increasing Sequences

Statement

Given a sorted integer array, nums, in non-decreasing order and an integer, k, determine whether it is possible to partition the array into one or more disjoint increasing subsequences, each having a length of at least k. Return true if such a partition exists; otherwise, return false.

Constraints:

  • 1≤1 \leq k ≤\leq nums.length≤103\leq 10^3

  • 1≤1 \leq nums[i] ≤103\leq 10^3

  • The nums array is sorted in non-decreasing order.