If current bracket is a closing bracket then pop from stack if it is not empty . If stack is empty then sequence is not balanced .
else if ( st . length == 0 ) { return false ; } else { st . pop ( ) ; } }