Clean n short 10 lines C++ Code || Explaination
Intuition\n * As you want to minimize , right-left+1.  \n * To ensure this condition , we need to minimize the right and maximize the left as much as possible. 
# Intuition\n * As you want to minimize , `right-left+1`.  \n * To ensure this condition , we need to minimize the `right` and maximize the `left` as much as possible. \n * It simply means , we will always choose string from start , as well as end for the final common subsequence , and we will delete all the elements between them. ```(ans = right - left + 1)```\n *  ```xxx......xxxx``` we will choose all characters from the start to a particular `left` , and we will choose all chracters from the end to a particular `right`. \n  \n * ```ans = min(ans , right-left+1)``` for all possible ```left``` and ```right```\n\n\n# Code\n```\nclass Solution {\npublic: \n     \n    int minimumScore(string s, string t) {\n        \n        int n = s.length() , m = t.length();  \n        vector<int> pre(n,0) , suf(n,0); \n\n        for(int i = 0 , j = 0 ; i<n and j<m ; i++){\n             if(s[i]==t[j]) pre[i]++ , j++; \n             if(i) pre[i]+=pre[i-1]; \n        }\n        \n        for(int i = n-1 , j = m-1 ; i>=0 and j>=0 ; i--){\n              if(s[i]==t[j]) suf[i]++ , j--; \n              if(i+1<n) suf[i]+=suf[i+1]; \n        }\n        \n        int ans = m;\n\n        for(int i = 0 ; i < n ; i++){ \n            if(i==0) ans = min(ans , m-suf[0]); \n            else if(i==n-1) ans = min(ans , m-pre[n-1]); \n            else ans = min(ans , m-pre[i]-suf[i+1]);\n        } \n\n        return max(0 , ans); \n    }\n};\n```
['Two Pointers', 'Binary Search', 'Greedy', 'Prefix Sum', 'C++']