Skip to content

Commit 039c351

Browse files
committed
Fixed style
1 parent 526b299 commit 039c351

File tree

1 file changed

+9
-4
lines changed
  • src/main/java/g3401_3500/s3435_frequencies_of_shortest_supersequences

1 file changed

+9
-4
lines changed

src/main/java/g3401_3500/s3435_frequencies_of_shortest_supersequences/Solution.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ private List<String> buildWtcList(List<String> words, int[] tans) {
6363
private void updateBgEdArrays(List<String> wtc, int[] bg, int[] ed) {
6464
for (String word : wtc) {
6565
int l = word.charAt(0) - 'a';
66-
if (bg[l] == -1) bg[l] = wtc.indexOf(word);
66+
if (bg[l] == -1) {
67+
bg[l] = wtc.indexOf(word);
68+
}
6769
ed[l] = wtc.indexOf(word);
6870
}
6971
}
@@ -135,11 +137,14 @@ private void processChkList(
135137
List<Integer> chk, List<String> wtc, int[] tans, int[] bg, int[] ed, int[] indg) {
136138
while (!chk.isEmpty()) {
137139
int u = chk.remove(chk.size() - 1);
138-
if (bg[u] == -1) continue;
139-
140+
if (bg[u] == -1) {
141+
continue;
142+
}
140143
for (int j = bg[u]; j <= ed[u]; j++) {
141144
int l = wtc.get(j).charAt(1) - 'a';
142-
if (tans[l] == 2) continue;
145+
if (tans[l] == 2) {
146+
continue;
147+
}
143148
indg[l]--;
144149
if (indg[l] == 0) {
145150
chk.add(l);

0 commit comments

Comments
 (0)