We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbaada2 commit 721d218Copy full SHA for 721d218
src/main/kotlin/g3201_3300/s3213_construct_string_with_minimum_cost/Solution.kt
@@ -88,8 +88,7 @@ class Solution {
88
for (i in 1 until dp.size) {
89
node = ac.go(node, target[i - 1])
90
var temp = node
91
- while (temp != null && temp !== root
92
- ) {
+ while (temp != null && temp !== root) {
93
if (temp.`val` != null && dp[i - temp.len] < Int.MAX_VALUE / 2) {
94
dp[i] = min(dp[i], (dp[i - temp.len] + temp.`val`!!))
95
}
0 commit comments