[Python] [Left to right and right to left traversal]
\n\n    def minimumScore(self, s: str, t: str) -> int:\n        l = len(s)\n\n        right = [0]*(l)\n        tlen = len(t)\n        curr =0\n           \n    
\n```\n    def minimumScore(self, s: str, t: str) -> int:\n        l = len(s)\n\n        right = [0]*(l)\n        tlen = len(t)\n        curr =0\n           \n        \n        curr = 0\n        for i in range(l-1,-1,-1):\n            if curr<tlen and s[i]==t[tlen-curr-1]:\n                curr+=1\n            right[i]=curr\n        \n        ans =tlen-right[0]\n        curr=0\n        #print(f"{left} {right} {l} {tlen}")\n        for i in range(l):\n            #print(f"{i} {left[i]} {right[i+1] if i+1<l else 0}")\n            if curr<tlen and s[i]==t[curr]:\n                curr+=1\n                \n            ans = min(ans,tlen- min(curr+ (right[i+1] if i+1<l else 0),tlen))\n        \n        return ans\n```
['Python']