Problem Statement
Given a string consisting only of opening and closing curly brackets '{' and '}' find
out the minimum number of reversals required to make a balanced expression.
If it cannot be balanced, then print -1.
Example 1:
4
}{{}}{{{
{{}}}}
{{}{{{}{{}}{{
{{{{}}}}
>> 3
>> 1
>> -1
>> 0