动态规划
文章平均质量分 65
JavyZheng
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 55 Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:原创 2014-08-31 16:54:35 · 765 阅读 · 0 评论 -
LeetCode 89 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原创 2014-10-27 12:27:50 · 624 阅读 · 0 评论 -
LeetCode 91 Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the原创 2014-10-27 12:48:15 · 1537 阅读 · 0 评论 -
LeetCode 80 Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:原创 2014-10-26 11:05:34 · 778 阅读 · 0 评论 -
LeetCode 12 Word Break II
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word原创 2014-08-23 11:46:23 · 837 阅读 · 0 评论 -
LeetCode 37 Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences ofT in S.原创 2014-08-30 14:51:26 · 914 阅读 · 0 评论 -
LeetCode 31 Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), d原创 2014-08-28 15:09:54 · 648 阅读 · 0 评论 -
LeetCode 20 Palindrome Partitioning II
Given a string s, partition s such that every substring of the partition is a palindrome.Retrun原创 2014-08-27 10:35:12 · 717 阅读 · 0 评论 -
LeetCode 13 Word Break
Given s string s and a dictionary of words dict, determine if s can be segmengted into a space-separated sequence of one or原创 2014-08-23 12:02:05 · 660 阅读 · 0 评论 -
LeetCode 32 Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle原创 2014-08-28 22:26:19 · 817 阅读 · 0 评论 -
最长公共子序列(LCS)和最长公共子串(LCSubString)
最长公共子序列public class LCS{ public static String lcs(String a, String b) { int[][] lengths = new int[a.length()+1][b.length()+1]; // row 0 and column 0 are initialized to 0 al原创 2013-10-05 15:54:45 · 1722 阅读 · 0 评论 -
最长递增子序列
问题:给定一个整数数组,返回数组的zuichangdizen原创 2014-11-21 11:11:43 · 737 阅读 · 0 评论
分享