Skip to content

Commit 424e885

Browse files
refactor 394
1 parent da6b079 commit 424e885

File tree

1 file changed

+0
-3
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-3
lines changed

src/main/java/com/fishercoder/solutions/_394.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,16 @@ public String decodeString(String s) {
1818
while (s.charAt(idx + 1) >= '0' && s.charAt(idx + 1) <= '9') {
1919
idx++;
2020
}
21-
2221
count.push(Integer.parseInt(s.substring(start, idx + 1)));
2322
} else if (s.charAt(idx) == '[') {
2423
str.push("");
2524
} else if (s.charAt(idx) == ']') {
2625
String st = str.pop();
2726
StringBuilder sb = new StringBuilder();
2827
int n = count.pop();
29-
3028
for (int j = 0; j < n; j++) {
3129
sb.append(st);
3230
}
33-
3431
str.push(str.pop() + sb.toString());
3532
} else {
3633
str.push(str.pop() + s.charAt(idx));

0 commit comments

Comments
 (0)