摘要: 问题: 给定一个n,有数组1~n, 排列该数组,使得数组两两元素之间的差值有k种。 Example 1: Input: n = 3, k = 1 Output: [1, 2, 3] Explanation: The [1, 2, 3] has three different positive int 阅读全文
posted @ 2020-04-19 13:28 habibah_chang 阅读(124) 评论(0) 推荐(0)
摘要: 问题: 给定一个攻击时间点数组,和每一次攻击所持续的时间长度。 求在攻击时间点数组的攻击下,一共能持续多久。 Example 1: Input: [1,4], 2 Output: 4 Explanation: At time point 1, Teemo starts attacking Ashe 阅读全文
posted @ 2020-04-19 11:26 habibah_chang 阅读(96) 评论(0) 推荐(0)