Skip to content

Commit 45fcfe1

Browse files
fix build
1 parent 508b481 commit 45fcfe1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ public boolean isValid(String S) {
2626

2727
for (char c : S.toCharArray()) {
2828
if (c == 'c') {
29-
if (stack.isEmpty() || stack.pop() != 'b') return false;
30-
if (stack.isEmpty() || stack.pop() != 'a') return false;
29+
if (stack.isEmpty() || stack.pop() != 'b') {
30+
return false;
31+
}
32+
if (stack.isEmpty() || stack.pop() != 'a') {
33+
return false;
34+
}
3135
} else {
3236
stack.push(c);
3337
}

src/test/java/com/fishercoder/_1003Test.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ public class _1003Test {
1111
private static _1003.Solution1 solution1;
1212

1313
@BeforeClass
14-
public static void setup() {solution1 = new _1003.Solution1();}
14+
public static void setup() {
15+
solution1 = new _1003.Solution1();
16+
}
1517

1618
@Test
1719
public void test1() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy