If closing bracket , i . e . , str [ i ] = ' ) ' && stack is not empty then mark both " open ▁ & ▁ close " bracket indexs as 1 . Pop the previous opening bracket 's index
if ( ! stk . empty ( ) ) { BCP [ i ] = 1 ; BOP [ stk . top ( ) ] = 1 ; stk . pop ( ) ; }