Solve the Logical Expression given by string
Given string str representing a logical expression which consists of the operators | (OR), & (AND),! (NOT) , 0, 1 and, only (i.e. no space between characters). The task is to print the result of the logical expression. Examples: Input: str = "[[0,&,1],|,[!,1]]" Output: 0 Explanation:[[0,