
LeetCode
_子宽
这个作者很懒,什么都没留下…
-
原创 LeetCode 689. Maximum Sum of 3 Non-Overlapping Subarrays
QuestionIn a given array nums of positive integers, find three non-overlapping subarrays with maximum sum.Each subarray will be of size k, and we want to maximize the sum of all 3*k entries.Return the...2018-04-13 20:42:11188
0
-
原创 LeetCode 792. Number of Matching Subsequences
QuestionGiven string S and a dictionary of words words, find the number of words[i] that is a subsequence of S.Example :Input: S = "abcde"words = ["a", "bb", "acd", "ace"]Output: 3Explanation: The...2018-04-13 20:45:27105
0
-
原创 LeetCode 514. Freedom Trail && 动态规划与贪心算法的对比分析
QuestionIn the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to spell a specific keyword in order to open t...2018-04-30 21:52:09218
0
-
原创 Leetcode 338. Counting Bits
QuestionGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.ExampleFor num = 5 ...2018-04-19 21:16:3473
0
-
原创 LeetCode 730. Count Different Palindromic Subsequences
QuestionGiven a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7.A subsequence of a string S is obtained by deleting 0 or more cha...2018-05-01 21:25:29378
0
-
原创 LeetCode 343. Integer Break
QuestionGiven a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2,...2018-04-21 10:15:2685
0
-
原创 LeetCode 410. Split Array Largest Sum
QuestionGiven an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum among the...2018-04-27 11:35:5794
0