mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-04 03:00:06 +08:00
Bug fixes and improvements (#1348)
* Add "reference" for EN version. Bug fixes. * Unify the figure reference as "the figure below" and "the figure above". Bug fixes. * Format the EN markdown files. * Replace "" with <u></u> for EN version and bug fixes * Fix biary_tree_dfs.png * Fix biary_tree_dfs.png * Fix zh-hant/biary_tree_dfs.png * Fix heap_sort_step1.png * Sync zh and zh-hant versions. * Bug fixes * Fix EN figures * Bug fixes * Fix the figure labels for EN version
This commit is contained in:
@@ -69,7 +69,7 @@ function minPathSumDP(grid) {
|
||||
return dp[n - 1][m - 1];
|
||||
}
|
||||
|
||||
/* 最小路径和:状态压缩后的动态规划 */
|
||||
/* 最小路径和:空间优化后的动态规划 */
|
||||
function minPathSumDPComp(grid) {
|
||||
const n = grid.length,
|
||||
m = grid[0].length;
|
||||
@@ -116,6 +116,6 @@ console.log(`从左上角到右下角的最小路径和为 ${res}`);
|
||||
res = minPathSumDP(grid);
|
||||
console.log(`从左上角到右下角的最小路径和为 ${res}`);
|
||||
|
||||
// 状态压缩后的动态规划
|
||||
// 空间优化后的动态规划
|
||||
res = minPathSumDPComp(grid);
|
||||
console.log(`从左上角到右下角的最小路径和为 ${res}`);
|
||||
|
||||
Reference in New Issue
Block a user