摘要: 问题: 给定一个数组A为某个数的各位数,和数字K,求给A组成的数字+K,所得的数字也像A做成数组返回。 Example 1: Input: A = [1,2,0,0], K = 34 Output: [1,2,3,4] Explanation: 1200 + 34 = 1234 Example 2: 阅读全文
posted @ 2020-06-02 15:06 habibah_chang 阅读(116) 评论(0) 推荐(1) 编辑
摘要: 问题: 给定一个山峦分布数组,元素值代表高度。 假设score分值=两山高度和-两山距离=A[i]+A[j]-(j-i)=A[i]+A[j]+i-j 求这个分值最高是多少? Example 1: Input: [8,1,5,2,6] Output: 11 Explanation: i = 0, j 阅读全文
posted @ 2020-06-02 14:41 habibah_chang 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 问题: 传送带依次传送weights数组上对应元素重量的货物。 限制每天最多传送X重量的货物,D天刚好传送完毕,请问这个限重X是多少。 Example 1: Input: weights = [1,2,3,4,5,6,7,8,9,10], D = 5 Output: 15 Explanation: 阅读全文
posted @ 2020-06-02 11:36 habibah_chang 阅读(157) 评论(0) 推荐(0) 编辑