BAEL-3481 - modified as per Editor Review comments.

This commit is contained in:
BudBak
2020-01-10 15:10:43 +05:30
parent eeb76f09e0
commit e59d0e481d
4 changed files with 6 additions and 6 deletions
@@ -6,7 +6,7 @@ import java.util.LinkedList;
public class BalancedBracketsUsingDeque {
public boolean isBalanced(String str) {
if (null == str || str.length() == 0 || ((str.length() % 2) != 0)) {
if (null == str || ((str.length() % 2) != 0)) {
return false;
} else {
char[] ch = str.toCharArray();
@@ -3,7 +3,7 @@ package com.baeldung.algorithms.balancedbrackets;
public class BalancedBracketsUsingString {
public boolean isBalanced(String str) {
if (null == str || str.length() == 0 || ((str.length() % 2) != 0)) {
if (null == str || ((str.length() % 2) != 0)) {
return false;
} else {
char[] ch = str.toCharArray();