Comments (5)
DP习题 6.7 动态规划解答思路
http://www.geeksforgeeks.org/dynamic-programming-set-12-longest-palindromic-subsequence/
- dp[i][j]:[i, j] 区间内字符串的最长回文子序列
- 递推公式:
- if (s[i] == s[j]):dp[i][j] 可以在 dp[i + 1][j - 1] 的基础上增加两个回文子序列长度
- if (s[i] != s[j]):max(dp[i + 1][j], dp[i][j - 1]),去掉i或j其中的一个字符,然后比较两种情况下所剩的字符串哪个回文子序列长
from durant35.github.io.
DP习题 6.7 直接递归解答思路
http://www.geeksforgeeks.org/dynamic-programming-set-12-longest-palindromic-subsequence/
- Let X[0..n-1] be the input sequence of length n and L(0, n-1) be the length of the longest palindromic subsequence of X[0..n-1].
- If last and first characters of X are same, then L(0, n-1) = L(1, n-2) + 2.
Else L(0, n-1) = MAX (L(1, n-1), L(0, n-2)).
from durant35.github.io.
最长公共子序列
- 子序列 sub sequence问题,例:最长公共子序列,[LeetCode] Distinct Subsequences(求子序列个数)
- [LeetCode] Distinct Subsequences题解
from durant35.github.io.
最长递增子序列
P157 P196
300. Longest Increasing Subsequence
- [Lintcode] Longest Increasing Subsequence 最长上升序列
- 跟着编程之美学算法——最长递增子序列
- 最长上升子序列 LIS(Longest Increasing Subsequence)
from durant35.github.io.
最长递增子序列
最长公共子序列
最长回文子序列
from durant35.github.io.
Related Issues (20)
- Github Pages 自定义域名 HOT 1
- 红黑树 HOT 1
- C/C++常见修饰符(inline&static&const&extern&volatile) HOT 4
- 贪心算法 HOT 1
- Vmware12(on Ubuntu16.04) 安装 OS X10.11
- 8.17测试任务
- 程序内存地址==>虚拟内存==>物理内存 HOT 15
- gdb 工具
- 进程上下文/中断上下文/...
- static_cast<...>(...) 显示类型转换 HOT 2
- [ROS] 多线程订阅消息 HOT 2
- ROS TF变换定义分析 HOT 2
- using声明、using指示及其作用域详解 HOT 2
- C++ std珠玑
- 卡尔曼滤波 vs 粒子滤波
- Github Markdown珠玑 HOT 1
- 标准Linux目录结构&含义和用途 HOT 2
- 特殊文件 /dev/null /dev/zero
- 串口线也分直连线和交叉线
- Linux 珠玑
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from durant35.github.io.