mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-09 14:06: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:
@@ -82,7 +82,7 @@ function editDistanceDP(s, t) {
|
||||
return dp[n][m];
|
||||
}
|
||||
|
||||
/* 編輯距離:狀態壓縮後的動態規劃 */
|
||||
/* 編輯距離:空間最佳化後的動態規劃 */
|
||||
function editDistanceDPComp(s, t) {
|
||||
const n = s.length,
|
||||
m = t.length;
|
||||
@@ -130,6 +130,6 @@ console.log(`將 ${s} 更改為 ${t} 最少需要編輯 ${res} 步`);
|
||||
res = editDistanceDP(s, t);
|
||||
console.log(`將 ${s} 更改為 ${t} 最少需要編輯 ${res} 步`);
|
||||
|
||||
// 狀態壓縮後的動態規劃
|
||||
// 空間最佳化後的動態規劃
|
||||
res = editDistanceDPComp(s, t);
|
||||
console.log(`將 ${s} 更改為 ${t} 最少需要編輯 ${res} 步`);
|
||||
|
||||
Reference in New Issue
Block a user