https://leetcode.cn/problems/delete-columns-to-make-sorted/

class Solution {
    public int minDeletionSize(String[] strs) {
        int m=strs.length;
        int n=strs[0].length();
        int count=0;
        for(int i=0;i<n;i++){
            char before='a';
            for(int j=0;j<m;j++){
                if(strs[j].charAt(i)>=before){
                    before=strs[j].charAt(i);
                }
                else{
                    count++;
                    break;
                }
            }
        }
        return count;
    }
}