Maximum Boolean Parenthesization String [ Microsoft, Amazon]

Problem: Count the maximum number of ways we can parenthesize of a given boolean expression so that the value of expression evaluates to true or false as asked.

Boolean expression will be given with following symbols.

Symbols
    ‘T’ —> true
    ‘F’ —> false

And the Operators
    &   —> boolean AND
    |   —> boolean OR
    ^   —> boolean XOR

The appears as Interview question in Microsoft & Amazon.

 

Comments are closed.