Count ways to parenthesize a boolean expression of T,F and operators &|^ so it evaluates to true, using recursion.
{ "s": "T|F&T", "i": 0, "j": 4, "isTrue": true }
2
{ "s": "T^F|T", "i": 0, "j": 4, "isTrue": true }
1
{ "s": "F|T^F", "i": 0, "j": 4, "isTrue": true }
Sign in to Run Code and Submit