Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Save all the indices that have different characters on <code>s1</code> and <code>s2</code> into a list, and work only with this list.
Try to use dynamic programming on this list to solve the problem. What will be the states and transitions of this dp?