make code readable

This commit is contained in:
shellhub 2019-10-27 17:56:39 +08:00
parent 28cb69ed68
commit 87fcd2c8a4

View File

@ -62,7 +62,7 @@ class BalancedBrackets {
case ')':
case ']':
case '}':
if (!(!bracketsStack.isEmpty() && isPaired(bracketsStack.pop(), bracket))) {
if (bracketsStack.isEmpty() || !isPaired(bracketsStack.pop(), bracket)) {
return false;
}
break;