
动态规划
文章平均质量分 71
普通网友
这个作者很懒,什么都没留下…
展开
-
LeetCode 64 Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at a原创 2017-07-01 11:55:06 · 175 阅读 · 0 评论 -
LeetCode 377 Combination Sum IV
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. Example: nums = [1, 2, 3] target = 4 The poss原创 2017-07-01 11:58:30 · 160 阅读 · 0 评论 -
LeetCode 70 Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Note: Given n will be a posi原创 2017-07-01 12:08:37 · 186 阅读 · 0 评论 -
LeetCode 718 Maximum Length of Repeated Subarray
Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3 Explanation: The repeated sub原创 2018-01-28 23:32:54 · 229 阅读 · 0 评论 -
LeetCode 689 Maximum Sum of 3 Non-Overlapping Subarrays
In 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 result ...原创 2018-02-15 10:24:21 · 335 阅读 · 0 评论