Easy Binary Search Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int minimumScore(string s, string t) {\n        int m = s.size();\n        int n = t.size();\n        \n        // Initialize pref and suff arrays\n        vector<int> pref(n, -1), suff(n, -1);\n        \n        // Calculate pref - left to right subsequence matching\n        int j = 0;\n        for (int i = 0; i < m && j < n; ++i) {\n            if (s[i] == t[j]) {\n                pref[j] = i;\n                ++j;\n            }\n        }\n        \n        // Calculate suff - right to left subsequence matching\n        j = n - 1;\n        for (int i = m - 1; i >= 0 && j >= 0; --i) {\n            if (s[i] == t[j]) {\n                suff[j] = i;\n                --j;\n            }\n        }\n        // for(auto it: pref) cout << it << \' \'; cout << endl;\n        // for(auto it: suff) cout << it << \' \'; cout << endl;\n\n        int result = n;\n        if (pref[n - 1] != -1) result = 0;\n        \n        for(int i = 0; i < n; i++) if(pref[i] != -1) result = min(result, n - i);\n        for(int i = n-1; i >= 0; i--) if(suff[i] != -1) result = min(result, i);\n        for (int i = 0; i < n - 1; ++i) {\n            if(pref[i] == -1) continue;\n            int lo = i+1, hi = n, mid;\n            while(hi-lo > 1){\n                mid = (hi+lo)/2;\n                if(suff[mid] <= pref[i]) lo = mid;\n                else hi = mid;\n                // cout << i << \' \' << mid << endl;/\n            }\n            result = min(result, hi - i - 1);\n        }\n        \n        return result;\n    }\n};\n\n```
['Two Pointers', 'String', 'Binary Search', 'C++']