摘要:
问题: 给出一列歌曲所花时间的数组。 求任意两首歌合起来时间是60分钟的倍数的组队pair数。 Example 1: Input: [30,20,150,100,40] Output: 3 Explanation: Three pairs have a total duration divisibl 阅读全文
摘要:
问题: 给出一个数组,和一个目标值target 求一个数值value,将数组中所有>value的数换成value后,使得数组和最接近target Example 1: Input: arr = [4,9,3], target = 10 Output: 3 Explanation: When usin 阅读全文
摘要:
问题: 给定一个航班预定列表,每一项为 [i, j, k],意思是从 i ~ j 航班,每个航班都需要预定k个座位。 一共有n个航班,即 1<=i<=j<=n,求满足这个列表的航班1~n的座位数列表。 Example 1: Input: bookings = [[1,2,10],[2,3,20],[ 阅读全文