From 87fcd2c8a425af324137a0d1308c843b8c1bfba4 Mon Sep 17 00:00:00 2001 From: shellhub Date: Sun, 27 Oct 2019 17:56:39 +0800 Subject: [PATCH] make code readable --- DataStructures/Stacks/BalancedBrackets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataStructures/Stacks/BalancedBrackets.java b/DataStructures/Stacks/BalancedBrackets.java index ea342219..d9f6aa0a 100644 --- a/DataStructures/Stacks/BalancedBrackets.java +++ b/DataStructures/Stacks/BalancedBrackets.java @@ -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;