help needed in dp problem boolean parenthesis

Правка en1, от aman_naughty, 2019-07-28 16:23:38

problem : link

code : link

My approach is also the same as mentioned in the editorial but I am getting wrong answer.

Instead of using two separate memoisation table for true and false I am using only one dp

dp[i][j][w] = the number of ways to put parenthesis such that the result is w

where w is 1 for true and 0 for false;

Can someone tell me where am I wrong

Теги #2d-dp, #interview, #help, important

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский aman_naughty 2019-07-28 16:23:38 525 Initial revision (published)