[Python] Sliding Window Min |  100% TC O(N)
Intuition\n Describe your first thoughts on how to solve this problem. \nWe can remove whole range from left to right\n\n# Approach\n Describe your approach to 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nWe can remove whole range from left to right\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nTry removing each range and check if remaining string form valid subsequence or not.\nTo do this we need to precompute match indices in string s.\nThen using sliding window (or exhaustive binary search) we can find minimum window size satisfying above condition.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n# Code\n```\nclass Solution:\n    def minimumScore(self, s: str, t: str) -> int:\n        ns,nt = len(s),len(t)\n        pref = [ns]*(nt+1) # occ of char t[i] in s\n        suff = [-1]*(nt+1) # occ of char t[i] in reversed s\n        pref[0] = -1\n        suff[-1] = ns\n        ti = 0\n        for i in range(ns):\n            if(ti>=nt): break\n            if(s[i]==t[ti]): \n                pref[ti+1] = i;\n                ti +=1\n        ti = nt-1\n        for i in reversed(range(ns)):\n            if(ti<0): break\n            if(s[i]==t[ti]): \n                suff[ti] = i;\n                ti -=1\n        if(pref[-1]<ns): return 0; # whole subseq t exist in s\n        i = 0 # sliding window to find min window size\n        res = max(ns,nt)\n        for j in range(nt):\n            i +=1\n            while(i<=j and pref[i]<suff[j+1]): i +=1\n            i -=1\n            if(pref[i]<suff[j+1]): \n                res = min(res,j-i+1)\n        return res\n```
['Python3']