add new solutions
This commit is contained in:
parent
ca24d0a56a
commit
0c73608ce5
36 changed files with 791 additions and 0 deletions
16
solutions/9/q944/solution.go
Normal file
16
solutions/9/q944/solution.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package q944
|
||||
|
||||
func minDeletionSize(strs []string) int {
|
||||
nDel := 0
|
||||
for col := range len(strs[0]) {
|
||||
for row := 1; row < len(strs); row++ {
|
||||
if strs[row][col] < strs[row-1][col] {
|
||||
nDel++
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return nDel
|
||||
}
|
||||
|
||||
var _ = minDeletionSize
|
||||
Loading…
Add table
Add a link
Reference in a new issue