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