mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-08 21:46:06 +00:00
Bug fixes and improvements (#1380)
* preorder, inorder, postorder -> pre-order, in-order, post-order * Bug fixes * Bug fixes * Update what_is_dsa.md * Sync zh and zh-hant versions * Sync zh and zh-hant versions. * Update performance_evaluation.md and time_complexity.md * Add @khoaxuantu to the landing page. * Sync zh and zh-hant versions * Add @ khoaxuantu to the landing page of zh-hant and en versions.
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