stores the number of characters between a closing and opening parenthesis if this count is less than or equal to 1 then the brackets are redundant else not
int elementsInside = 0 ; while ( top != ' ( ' ) { elementsInside ++ ; top = Stack . top ( ) ; Stack . pop ( ) ; } if ( elementsInside < 1 ) { return 1 ; } }