File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
src/main/java/com/thealgorithms/stacks Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ private ValidParentheses() {
1414 /**
1515 * Returns true if the input string has valid parentheses.
1616 *
17- * @params the string containing parentheses
17+ * @param s the string containing parentheses
1818 * @return true if valid, false otherwise
1919 */
2020 public static boolean isValid (final String s ) {
@@ -39,11 +39,4 @@ public static boolean isValid(final String s) {
3939 }
4040 return stack .isEmpty ();
4141 }
42-
43- public static void main (final String [] args ) {
44- System .out .println (isValid ("()[]{}" )); // true
45- System .out .println (isValid ("(]" )); // false
46- System .out .println (isValid ("([)]" )); // false
47- System .out .println (isValid ("{[]}" )); // true
48- }
4942}
You can’t perform that action at this time.
0 commit comments