
动态规划
文章平均质量分 66
u010850285
这个作者很懒,什么都没留下…
展开
-
Palindrome Partitioning I II
Palindrome Partitioning I Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s =转载 2015-03-27 11:32:40 · 373 阅读 · 0 评论 -
动态规划
用动态规划的方法,就是要找到其转移方程式,也叫动态规划的递推式,动态规划的解法无非是维护两个变量,局部最优和全局最优。其中局部最优的意思就是到目前这个数字为止,其最好的值,整体最优就是整体的最好值。 例子: Maximum Product Subarray Find the contiguous subarray within an array (containing原创 2015-03-18 11:07:09 · 346 阅读 · 0 评论 -
Wildcard Matching
Implement wildcard pattern matching with support for'?'and'*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover the转载 2015-03-05 15:57:08 · 361 阅读 · 0 评论