Skip to content

Commit a87d5d0

Browse files
Fix: fully Checkstyle-compliant and optimized BalancedBrackets
1 parent 3c208db commit a87d5d0

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

src/main/java/com/thealgorithms/stacks/BalancedBrackets.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,5 @@ public static boolean isBalanced(String input) {
8989
return stack.isEmpty();
9090
}
9191

92-
/**
93-
* Optional main method for quick manual testing
94-
*/
95-
public static void main(String[] args) {
96-
String[] tests = {
97-
"()",
98-
"[()]",
99-
"{[<>]}",
100-
"[(])",
101-
"[a+b]",
102-
"",
103-
"<{[()]}>",
104-
"[{<]}>"
105-
};
106-
107-
for (String t : tests) {
108-
try {
109-
System.out.printf("%s -> %b%n", t, isBalanced(t));
110-
} catch (Exception e) {
111-
System.out.printf("%s -> Exception: %s%n", t, e.getMessage());
112-
}
113-
}
114-
}
92+
11593
}

0 commit comments

Comments
 (0)