Python 3   ||   10 lines,  two passes   ||   xx
\nclass Solution:\n    def minimumScore(self, s: str, t: str) -> int:\n\n        m, n =  len(s), len(t)\n        suff, j = [0]*m, n\n\n        for i in range(m)
```\nclass Solution:\n    def minimumScore(self, s: str, t: str) -> int:\n\n        m, n =  len(s), len(t)\n        suff, j = [0]*m, n\n\n        for i in range(m)[::-1]:\n\n            if j > 0 and s[i] == t[j-1]: j -= 1\n            suff[i] = j-1\n\n        ans, j = j, 0\n\n        for i in range(m):\n\n            ans = min(ans, max(0, suff[i] - j + 1))\n            if j < n and s[i] == t[j]: j += 1\n\n        return min(ans, n-j)\n```\n[https://leetcode.com/problems/subsequence-with-the-minimum-score/submissions/896781999](http://)\n\nI could be wrong, but I think that time complexity is *O*(*S* + *T*) and space complexity is *O*(*S* + *T*), in which *S* ~ `len(s)` and *T* ~ `len(t)`.
['Python3']