Skip to content

Commit 65565ad

Browse files
authored
Update Readme.md
1 parent f55a703 commit 65565ad

File tree

1 file changed

+0
-1
lines changed
  • Dynamic_Programming/1595.Minimum-Cost-to-Connect-Two-Groups-of-Points

1 file changed

+0
-1
lines changed

Dynamic_Programming/1595.Minimum-Cost-to-Connect-Two-Groups-of-Points/Readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ for (int i=0; i<m; i++)
1919
{
2020
for (int subset : state)
2121
dp[i][state] = dp[i-1][state-subset] + cost[i][subset]
22-
dp[i][state[ = dp[i-1][state] + minCost[i]
2322
}
2423
```
2524
注意对于state的遍历嵌套subset的遍历,时间复杂度并不是``` 2^N * 2^N```,而是```3^N```。你可以想象,对于每一个bit,在外、里两层的状态只可能是```10,11,00```。

0 commit comments

Comments
 (0)