2025-08-09 13:34:28 +0000 UTC

Crawler Log Folder

Code

class Solution:
    def minOperations(self, logs: List[str]) -> int:
        depth = 0
        for op in logs:
            if op == "../":
                depth = max(depth - 1, 0)
            elif op == "./":
                pass
            else:
                depth += 1
        return depth