Write a program to validate if the input string has redundant braces?
0 -> NO 1 -> YES
Input will be always a valid expression
and operators allowed are only
((a + b)) has redundant braces so answer will be 1 (a + (a + b)) doesn't have have any redundant braces so answer will be 0
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.