A interesting DP problem

Revision en1, by wish_me, 2017-08-30 21:04:40

You are given a string and 2 operators ( & , | ). Return the total number of ways in which you can evaluate to true using the given string and operator set.

Example : Input : TF Output : 1 Input : TFF Output : 2 ( T | F & F , T | F | F )

Tags 3-d dp, memoization

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English wish_me 2017-08-30 21:04:40 267 Initial revision (published)