Balanced Paranthesis
Given a string expression, check if brackets present in the expression are balanced or not. Brackets are balanced if the bracket which opens last, closes first.
{ a + [ b+ (c + d)] + (e + f) }
true
{ a + [ b - c } ]
false
Comments
Post a Comment
Please give us your valuable feedback