LeetCode Solutions/January 2023 LeetCoding Challenge/Delete Columns to Make Sorted.java
class Solution {
    public int minDeletionSize(String[] strs) {
        int numberOfColumns = 0;
        for (int i=0; i<strs[0].length(); i++){
            for (int j = 0; j<strs.length-1; j++){
                if (strs[j].charAt(i) > strs[j+1].charAt(i)){
                    numberOfColumns++;
                    break;
                }
            }
        }
        return numberOfColumns;
    }
}