python算法题--文件夹操作日志搜集器
作者:互联网
class Solution:
def minOperations(self, logs: List[str]) -> int:
result=0
for i in range(0,len(logs)):
if logs[i]=='../':
if result>0:
result-=1
elif logs[i]=='./':
continue
else:
result+=1
return result
标签:elif,logs,..,python,self,--,int,文件夹,result 来源: https://www.cnblogs.com/1016391912pm/p/16673007.html