上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 98 下一页
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2019-01-28 18:23 Veritas_des_Liberty 阅读(187) 评论(0) 推荐(0)
摘要: 984. String Without AAA or BBB Given two integers A and B, return any string S such that: S has length A + B and contains exactly A 'a' letters, and e 阅读全文
posted @ 2019-01-27 13:21 Veritas_des_Liberty 阅读(268) 评论(0) 推荐(0)
摘要: Given an array A of 0s and 1s, divide the array into 3 non-empty parts such that all of these parts represent the same binary value. If it is possible 阅读全文
posted @ 2019-01-26 21:26 Veritas_des_Liberty 阅读(275) 评论(0) 推荐(0)
摘要: Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and add x to A[i] (only once). After this process, we ha 阅读全文
posted @ 2019-01-26 21:18 Veritas_des_Liberty 阅读(253) 评论(0) 推荐(0)
摘要: Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting paren 阅读全文
posted @ 2019-01-26 21:16 Veritas_des_Liberty 阅读(191) 评论(0) 推荐(0)
摘要: 7w6:第七周程序填空题3 描述 实现一个三维数组模版CArray3D,可以用来生成元素为任意类型变量的三维数组,使得下面程序输出结果是: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, 阅读全文
posted @ 2019-01-24 21:47 Veritas_des_Liberty 阅读(554) 评论(0) 推荐(0)
摘要: You want to form a target string of lowercase letters. At the beginning, your sequence is target.length '?' marks. You also have a stamp of lowercase 阅读全文
posted @ 2019-01-24 12:42 Veritas_des_Liberty 阅读(290) 评论(0) 推荐(0)
摘要: 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 @ 2019-01-24 11:29 Veritas_des_Liberty 阅读(237) 评论(0) 推荐(0)
摘要: Given two arrays A and B of equal size, the advantage of A with respect to B is the number of indices i for which A[i] > B[i]. Return any permutation 阅读全文
posted @ 2019-01-23 22:56 Veritas_des_Liberty 阅读(217) 评论(0) 推荐(0)
摘要: A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands: -2: turn left 90 de 阅读全文
posted @ 2019-01-23 22:55 Veritas_des_Liberty 阅读(288) 评论(0) 推荐(0)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 98 下一页