javascript solution
\nvar minDeletionSize = function (strs) {\n  const rows = strs.length,\n    cols = strs[0].length\n  const sorted = Array(rows - 1).fill(false)\n  let res = 0\n
```\nvar minDeletionSize = function (strs) {\n  const rows = strs.length,\n    cols = strs[0].length\n  const sorted = Array(rows - 1).fill(false)\n  let res = 0\n  if (cols === 0) return res\n\n  let i, j\n  for (j = 0; j < cols; j++) {\n\tfor (i = 0; i < rows - 1; ++i) {\n      if (!sorted[i] && strs[i][j] > strs[i + 1][j]) {\n        res++\n        break\n      }\n    }\n    if (i < rows - 1) continue\n    for (i = 0; i < rows - 1; ++i) {\n      sorted[i] = sorted[i] || strs[i][j] < strs[i + 1][j]\n    }\n  }\n\n  return res\n}\n```
['JavaScript']