Solution based on great idea from Java_Programmer_CF
Intuition\nRefer Java_Programmer_CF solution:\nhttps://leetcode.com/problems/subsequence-with-the-minimum-score/solutions/3174018/binary-search-sliding-window/?
# Intuition\nRefer Java_Programmer_CF solution:\nhttps://leetcode.com/problems/subsequence-with-the-minimum-score/solutions/3174018/binary-search-sliding-window/?orderBy=most_votes\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```\n/**\n * @param {string} s\n * @param {string} t\n * @return {number}\n */\nvar minimumScore = function (SS, TT) {\n  let s = SS.split(""),\n    t = TT.split("");\n  let lo = 0,\n    hi = TT.length;\n  while (lo <= hi) {\n    let m = (lo + hi) >> 1;\n    if (check(s, t, m)) hi = m - 1;\n    else lo = m + 1;\n  }\n  return hi + 1;\n};\n\nfunction check(s, t, len) {\n  let t_length = t.length,\n    n = s.length;\n  if (len >= t_length) return true; //delete whole t array\n  let pos = Array(t_length).fill(s.length + 1); //Greedy left matching\n  // Arrays.fill(pos, 1_000_000_0);\n  let t_left_index = 0;\n  for (let i = 0; i < n; i++) {\n    if (t_left_index === t_length) break;\n    if (t[t_left_index] === s[i]) {\n      pos[t_left_index] = i;\n      t_left_index++;\n    }\n  }\n  if (t_left_index >= t_length - len) return true; //we can delete right subarray of length len\n  let right_index_of_s = n - 1;\n  for (let rp = t_length - 1; rp >= len; rp--) {\n    while (right_index_of_s >= 0 && s[right_index_of_s] != t[rp])\n      right_index_of_s--;\n    if (right_index_of_s === -1) return false;\n    let lp = rp - len - 1;\n    if (lp === -1 || pos[lp] < right_index_of_s) return true;\n    right_index_of_s--;\n  }\n  return false;\n}\n\n```
['JavaScript']