1598. Crawler Log Folder
Содержание
class Solution:
def minOperations(self, logs: List[str]) -> int:
res = 0
for v in logs:
if v == "../":
res = max(0, res - 1)
elif v[0] != ".":
res += 1
return res