Rust Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n1) Intruce two vectors: left & right.\n2) left[i] be the number of characters covered i
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n1) Intruce two vectors: left & right.\n2) left[i] be the number of characters covered in t (starting from left end) by s[0 ..i - 1].\n3) right[i] be the nuber of characters covered in t ( starting from right end) by s[i.. m-1].\n4) Once left & right have been calculated, the final solution could derived with a loop.\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)$$ -->\nO(N)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(N)\n# Code\n```\nimpl Solution {\n    pub fn minimum_score(s: String, t: String) -> i32 {\n        let (m, n) = (s.len(), t.len());\n        let (s, t) = (s.chars().collect::<Vec<char>>(), t.chars().collect::<Vec<char>>());\n        \n        let (mut left, mut right) = (vec![0; m + 1], vec![0; m + 1]);\n        let mut count = 0;\n        \n        for i in 0 .. m {\n            if count < n && s[i] == t[count] { count += 1; }\n            left[i + 1] = count;\n        }\n        \n        count = 0;\n        for i in (0 .. m).rev() {\n            if count < n && s[i] == t[n - count - 1] { count += 1; }\n            right[i] = count;\n        }\n        \n        let mut ret = n as i32;\n        for i in 0 ..= m {\n            ret = ret.min(0.max(n as i32 - left[i] as i32 - right[i] as i32));\n        }\n        \n        ret\n    }\n}\n```
['Rust']