摘要:
问题: 给定一组非负整数nums,和一个目标数S,求给nums的各个元素添加符号后,使得和为S的可能性有多少? Example 1: Input: nums is [1, 1, 1, 1, 1], S is 3. Output: 5 Explanation: -1+1+1+1+1 = 3 +1-1+ 阅读全文
摘要:
问题: 给定一组只包含'0' '1' 的字符串,给定两个正整数m和n,问,要使用m个'0' n个'1',能最多构成多少个给出字符串组中的字符串。 Example 1: Input: strs = ["10","0001","111001","1","0"], m = 5, n = 3 Output: 阅读全文
摘要:
问题: 给定一组数,请问是否将其分为两个数组,使得二者和相等。 Note: Each of the array element will not exceed 100. The array size will not exceed 200. Example 1: Input: [1, 5, 11, 阅读全文