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
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/288459.html