We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12286cf commit f56c249Copy full SHA for f56c249
1 file changed
src/main/java/com/thealgorithms/stacks/ValidParentheses.java
@@ -14,7 +14,7 @@ private ValidParentheses() {
14
/**
15
* Returns true if the input string has valid parentheses.
16
*
17
- * @params the string containing parentheses
+ * @param s the string containing parentheses
18
* @return true if valid, false otherwise
19
*/
20
public static boolean isValid(final String s) {
@@ -39,11 +39,4 @@ public static boolean isValid(final String s) {
39
}
40
return stack.isEmpty();
41
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
- }
49
0 commit comments