a parenthesis stre valid ifit stringit write AB a concatenate B A b valid string orIt write a a valid stringYou give parenthesis stre s in insert parenthesis position stringfor example s insert opening parenthesis closing parenthesis return minimum number move require s valid Example 1input s output 1example 2input s output 3 constraints1 slength 1000si