public class CommonParenthesisValidator extends java.lang.Object implements ParenthesisValidator
ParenthesisValidator.ParenthesisEnum
Constructor and Description |
---|
CommonParenthesisValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValidParenthesis(java.lang.String str)
O(n) time and O(1) space. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEmptyOrNull
public boolean isValidParenthesis(java.lang.String str)
isValidParenthesis
in interface ParenthesisValidator