Boolean Expression

Boolean Expression:

A boolean expression could have following symbols:
0 => false
1 => true
& => and
| => or
^ => xor
and desired result.
Implement a function to count the number of ways of parenthesizing the expression such that it evaluates to desired result.

Latest Source Code:
Github: BooleanExpression.java


Output:

 1^0|0|1 : ways = 2
Author: Hrishikesh Mishra