class Solution:
def minDeletionSize(self, A):
"""
:type A: List[str]
:rtype: int
"""
d = 0
for e in zip(*A): # zip(*¥)解压
if list(e) != sorted(e):
d += 1
return d
leetcode - 944 - 删除列以使之有序
最新推荐文章于 2019-04-24 15:43:33 发布
class Solution:
def minDeletionSize(self, A):
"""
:type A: List[str]
:rtype: int
"""
d = 0
for e in zip(*A): # zip(*¥)解压
if list(e) != sorted(e):
d += 1
return d