Please tell me the appraoach
Unable to find approach
Itβs a DP problem. Try to think of the recursive approach and just apply memorization.
What can be recursive approach?
compare ith and jth characters of 2 strings given. What options do you have?
If they are same, great! Go ahead.
If you get a β?β that too means a match. Because β?β will take the character you need.
If you get a β**β that means you can assume any length to be matched. It can be 0β¦1β¦2β¦any
For eg
ab*a
abddda , the * becomes ddd
Think now !
I hope Iβve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.