Java left & right
```\n// separate string s into two parts and match subsequence forward and backward separately\n    class Solution {\n        public int minimumScore(String s, 
```\n// separate string s into two parts and match subsequence forward and backward separately\n    class Solution {\n        public int minimumScore(String s, String t) {\n            int m = s.length(), n = t.length();\n            int[] left = new int[m];\n            for (int i = 0, j = 0; i < m; i++) {\n                if (j < n && s.charAt(i) == t.charAt(j)) {\n                    ++j;\n                }\n                left[i] = j;\n            }\n            int[] right = new int[m];\n            for (int i = m - 1, j = n - 1; i >= 0 ; i--) {\n                if (j >= 0 && s.charAt(i) == t.charAt(j)) {\n                    --j;\n                }\n                right[i] = j;\n            }\n            int min = Math.min(n - left[m - 1], right[0] + 1);\n            for (int i = 0; i + 1 < m; i++) {\n                min = Math.min(min, Math.max(0, right[i + 1] - left[i] + 1));\n            }\n            return min;\n        }\n    }
['Java']