GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcode.cn — 659. 分割数组为连续子序列 - 力扣(LeetCode) 题目描述 题目描述 题解 题解 提交记录 提交记录 中等 给你一个按 非递减顺序 排列的整数数组 请你判断是否能在将
如果可以分割
示例 1: 输入:nums = [1,2,3,3,4,5] 输出:true 解释:nums 可以分割成以下子序列: [1,2,3,3,4,5] --> 1, 2, 3 [1,2,3,3,4,5] --> 3, 4, 5 示例 2: 输入:nums = [1,2,3,3,4,4,5,5] 输出:true 解释:nums 可以分割成以下子序列: [1,2,3,3,4,4,5,5] --> 1, 2, 3, 4, 5 [1,2,3,3,4,4,5,5] --> 3, 4, 5 示例 3: 输入:nums = [1,2,3,4,4,5] 输出:false 解释:无法将 nums 分割成长度至少为 3 的连续递增子序列。
提示:
代码 代码 测试用例 测试用例 测试结果 测试结果 |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |