目录

力扣659. 分割数组为连续子序列

力扣659. Split Array into Consecutive Subsequences(分割数组为连续子序列)

判断能否将数组分割成连续递增子序列。

示例 1:

../posts/01_学习/87_LeetCode/0659_分割数组为连续子序列/img/0659-1-description.png

输入:[1,2,3,3,4,5]
输出:true
解释:[1,2,3] 和 [3,4,5]

提示:

  • 1 <= nums.length <= 10^4
  • -1000 <= nums[i] <= 1000
  • nums 按升序排列