摘要: 问题: 给定两个int数组,代表两个数位数值的列表。 从两个数组中,按照已有的顺序选取数位数值, 组成一个新的数,长度为k 求能构成的数最大为? Example 1: Input: nums1 = [3,4,6,5], nums2 = [9,1,2,5,8,3], k = 5 Output: [9, 阅读全文
posted @ 2021-04-09 20:17 habibah_chang 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定n个初始状态为off的灯, 第1次,按 1*i 号灯的开关。 第2次,按 2*i 号灯的开关。 ... 第n次,按 n 号灯的开关。 求最后on的灯共有几个。 Example 1: Input: n = 3 Output: 1 Explanation: At first, the thr 阅读全文
posted @ 2021-04-09 13:18 habibah_chang 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 问题: 给n个石子,由你开始选取,和你的朋友轮流进行。 每次选取,可以选取1~3个石子, 最后一个取完石子的人获胜,返回你是否能赢得胜利。 Example 1: Input: n = 4 Output: false Explanation: These are the possible outcom 阅读全文
posted @ 2021-04-09 12:35 habibah_chang 阅读(39) 评论(0) 推荐(0) 编辑