I am not getting the question
Question not clear
@ashutosh2 Bro the question says that you need to find the ways in which you can make the given string of parenthesis of length ‘m’ into a balanced string of length ‘n’. You can consider the example-
4 3
)()
Here you have to balance the string of length 3 and convert into a string of length 4. So the given string is ‘s’ and to make it balanced one you have to add a opening bracket in front of it. So there is only one way to balance the given string.