From d2771b5f26071998fd807ac231d9cd734c12a9e3 Mon Sep 17 00:00:00 2001 From: yennanliu Date: Mon, 18 Nov 2024 22:42:03 +0800 Subject: [PATCH] update 833 java --- .../main/java/LeetCodeJava/String/FindAndReplaceInString.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/leetcode_java/src/main/java/LeetCodeJava/String/FindAndReplaceInString.java b/leetcode_java/src/main/java/LeetCodeJava/String/FindAndReplaceInString.java index e5a2f3e3..84f3181b 100644 --- a/leetcode_java/src/main/java/LeetCodeJava/String/FindAndReplaceInString.java +++ b/leetcode_java/src/main/java/LeetCodeJava/String/FindAndReplaceInString.java @@ -105,6 +105,8 @@ public String findReplaceString_0_1(String s, int[] indices, String[] sources, S * * update index with replacement string length * + * -> NOTE !!! we use "source" length (with replacementIndex) + * (but NOT target length) */ i += sources[replacementIndex].length(); // Skip the replaced substring } else {