you give valid boolean expression string expression consist character 10 bitwise and operator bitwise or operator for example 11 1 valid 1 10 101 valid expressionsReturn minimum cost change final value expressionfor example expression 11001 value 11001 1101 101 11 1 we want apply operation new expression evaluate 0the cost change final value expression number operation perform expression the type operation describe followsTurn 1 0turn 0 1turn turn note precedence order calculation Evaluate parenthese lefttoright order Example 1input expression 101output 1explanation we turn 101 101 change 1 operationthe new expression evaluate 0 example 2input expression 00000output 3explanation we turn 00000 01000 3 operationsthe new expression evaluate 1example 3input expression 0101output 1explanation we turn 0101 0001 1 operationthe new expression evaluate 0 Constraints1 expressionlength 105expression contain 10 all parenthesis properly matchedThere parenthese ie substre expression