File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,11 @@ image::images/0062-01.png[{image_attr}]
5252
5353== 思路分析
5454
55+ 常规解法就是动态规划;从数学的角度来看,也是一个组合问题。
56+
5557[latexmath]
5658++++
57- C_{n}^{m} = \frac{A_{n}^{m}}{m!} = \frac{n!}{m! \cdot (n-m)!} = C_{n}^{n-m}
59+ C_{n}^{m} = \frac{A_{n}^{m}}{A_{m}^{m}} = \frac{n \cdot (n-1) \cdot \cdot \cdot(n-m+1)}{ m!} = \frac{n!}{m! \cdot (n-m)!} = C_{n}^{n-m}
5860++++
5961
6062对于本题而言,要想到达终点,需要往下走 latexmath:[n-1] 步,往右走 latexmath:[m-1] 步,总共需要走 latexmath:[n+m-2] 步。即:
@@ -110,6 +112,7 @@ include::{sourcedir}/_0062_UniquePaths_4.java[tag=answer]
110112. https://leetcode.cn/problems/unique-paths/solutions/701392/san-chong-shi-xian-xiang-xi-tu-jie-62-bu-4jz1/[62. 不同路径 - 三种实现+详细图解^]
111113. https://leetcode.cn/problems/unique-paths/solutions/514311/bu-tong-lu-jing-by-leetcode-solution-hzjf/[62. 不同路径 - 官方题解^]
112114. https://leetcode.cn/problems/unique-paths/solutions/514503/dong-tai-gui-hua-di-gui-gong-shi-deng-3z-9mp1/[62. 不同路径 - 动态规划,递归,公式等3中解决方法^]
115+ . https://www.cnblogs.com/1024th/p/10623541.html[排列组合的一些公式及推导(非常详细易懂)^]
113116
114117
115118
Original file line number Diff line number Diff line change @@ -1967,7 +1967,7 @@ endif::[]
19671967|{counter:codes2503}
19681968|{leetcode_base_url} /unique-paths/[62. 不同路径^]
19691969|{doc_base_url} /0062-unique-paths.adoc[题解]
1970- |✅ 动态规划或组合问题。常规解法就是动态规划,也是一个组合问题,可以直接使用组合公式 latexmath:[C_{n} ^{m} = \frac{n!}{m! \cdot (n-m)!}] 求解。
1970+ |✅ 动态规划或组合问题。常规解法就是动态规划;从数学的角度来看 ,也是一个组合问题,可以直接使用组合公式 latexmath:[C_{n} ^{m} = \frac{n!}{m! \cdot (n-m)!}] 求解。
19711971
19721972|===
19731973
You can’t perform that action at this time.
0 commit comments