Given two strings A and B. Each string represents an expression consisting of lowercase english alphabets, ’+’,
’-‘ and ’()’.
The task is to compare them and check if they are similar. If they are similar return 1 else return 0.
Note: It may be assumed that there are at most 26 operands from ‘a’ to ‘z’ and every operand appears only once.
The arguments given are string A and String B.
Return 1 if they represent the same expression else return 0.
1 <= length of the each String <= 100
Input 1: A = "-(a+b+c)" B = "-a-b-c" Output 1: 1 Input 2: A = "a-b-(c-d)" B = "a-b-c-d" Output 2: 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.