luoheng
10/6/2019 - 1:51 PM

minDeletionSize

func minDeletionSize(A []string) int {
    num := 0
    for i := 0; i < len(A[0]); i++ {
        for j := 1; j < len(A); j++ {
            if A[j-1][i] > A[j][i] {
                num++
                break
            } 
        }
    }
    return num
}