C++ solution!
Intuition\n\n\nclass Solution {\npublic:\n    int minimumScore(string s, string t) {\n        vector<int> left(t.size(), 0);\n        vector<int> right(t.size()
# Intuition\n\n```\nclass Solution {\npublic:\n    int minimumScore(string s, string t) {\n        vector<int> left(t.size(), 0);\n        vector<int> right(t.size(), 0);\n\n        int res = t.size();\n        int j = 0;\n        int n = t.size();\n        for(int i=0;i<s.size() && j<left.size();i++) {\n            if(t[j] == s[i]) {\n                left[j] = i;\n                res = min(res, n-1 - (j+1) + 1);\n                j++;\n            }\n        }\n\n        while(j < t.size()) {\n            left[j] = INT_MAX;\n            j++;\n        }\n\n        j = t.size() - 1;\n        for(int i=s.size()-1;i>=0 && j>=0;i--) {\n           if(s[i] == t[j]) {\n               right[j] = i;\n               res = min(res, j-1+1);\n               j--;\n            }\n        }\n\n        while(j>=0) {\n            right[j] = -1;\n            j--;\n        }\n\n\n        if(right[0]!=-1 || left[left.size()-1] != INT_MAX) {\n            return 0;\n        }\n        \n        j = 1;\n        for(int i =0;i<t.size();i++) {\n            if(left[i] == INT_MAX) {\n                break;\n            }\n            int left_index = left[i];\n            j = max(j, i+1);\n            while(j<right.size() && left_index>=right[j]) {\n                j++;\n            }\n\n            res = min(res, j-1 - (i+1) + 1);\n            \n        }\n\n        return res;\n    }\n};\n```
['C++']