DP(读作字母 D-P)常用作缩写,最常见的含义之一是 dynamic programming(动态规划):一种把大问题拆成子问题、并通过“记忆化/表格化”复用结果来提高效率的算法思想。
(在不同语境中,DP 也可能指 display picture“头像”、density-independent pixel“安卓 dp 单位”等。)
/ˌdiːˈpiː/
Dynamic programming can make some problems much faster to solve.
动态规划可以让某些问题的求解速度快很多。
By defining the state and recurrence carefully, the DP solution reduces exponential time to polynomial time.
通过仔细定义状态和递推关系,这个动态规划解法把指数级时间降低到了多项式时间。
DP 是由两个字母 D 和 P 组成的首字母缩写(initialism),在计算机科学里通常来自 Dynamic Programming 的缩写写法;由于使用频繁,后来在算法讨论与竞赛语境中被广泛简称为 DP。