Problem Description
Given a string A consisting only of '(' and ')'.
You need to find whether parantheses in A is balanced or not ,if it is balanced then return 1 else return 0.
1 <= |A| <= 105
First argument is an string A.
Return 1 if parantheses in string are balanced else return 0.
Input 1:
A = "(()())"
Input 2:
A = "(()"
Output 1:
1
Output 2:
0
Explanation 1:
Given string is balanced so we return 1
Explanation 2:
Given string is not balanced so we return 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 question? Checkout Sample Codes for more details.