摘要: The i-th person has weight people[i], and each boat can carry a maximum weight of limit. Each boat carries at most 2 people at the same time, provided 阅读全文
posted @ 2020-06-09 09:06 CNoodle 阅读(116) 评论(0) 推荐(0)
摘要: At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bil 阅读全文
posted @ 2020-06-09 08:16 CNoodle 阅读(130) 评论(0) 推荐(0)
摘要: 给定一个数字,我们按照如下规则把它翻译为字符串:0 翻译成 “a” ,1 翻译成 “b”,……,11 翻译成 “l”,……,25 翻译成 “z”。一个数字可能有多个翻译。请编程实现一个函数,用来计算一个数字有多少种不同的翻译方法。 示例 1: 输入: 12258输出: 5解释: 12258有5种不同 阅读全文
posted @ 2020-06-09 03:29 CNoodle 阅读(280) 评论(0) 推荐(0)