Help me To understand that problem

Revision en3, by aaryyann, 2025-05-02 01:35:37

for this problem can someone please tell where i am wrong ?? My thinking approach -----> if i find the length of LCS (Longest Common Subsequence) and then find Remain Length i.e. total — Lcs . after this i iterate over Patter (p) and if i found * i return true and if there is not any * we will take count of ? and subtract that with remaining length . Now if remaining length become 0 we return true else false ..

But this solution fails .... someone please explain why this wrong thinking ??

Tags dp, dp on string

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English aaryyann 2025-05-02 01:35:37 0 Reverted to en1
en2 English aaryyann 2025-05-02 01:35:14 0 Initial revision
en1 English aaryyann 2025-05-02 01:32:07 616 Initial revision (published)