1121. Divide Array Into Increasing Sequences
https://leetcode.com/problems/divide-array-into-increasing-sequences
Description
Given an integer array nums
sorted in non-decreasing order and an integer k
, return true
if this array can be divided into one or more disjoint increasing subsequences of length at least k
, or false
otherwise.
Example 1:
Example 2:
Constraints:
1 <= k <= nums.length <= 105
1 <= nums[i] <= 105
nums
is sorted in non-decreasing order.
ac
Last updated