摘要: 题意 给出一个区间的集合,请合并所有重叠的区间。 示例 输入: [[1,3],[2,6],[8,10],[15,18]] 输出: [[1,6],[8,10],[15,18]] 解释: 区间 [1,3] 和 [2,6] 重叠, 将它们合并为 [1,6]. 思路 贪心,按照每个区间的开始值,从小到大排序 阅读全文
posted @ 2020-03-05 20:24 阳离子 阅读(568) 评论(0) 推荐(0) 编辑
摘要: Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run sim 阅读全文
posted @ 2020-03-05 19:38 阳离子 阅读(106) 评论(0) 推荐(0) 编辑
摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number . For example, 1234321 is a palindromic numbe 阅读全文
posted @ 2020-03-05 17:26 阳离子 阅读(156) 评论(0) 推荐(0) 编辑