# [1598\. Crawler Log Folder](https://leetcode.com/problems/crawler-log-folder/) :::spoiler Solution ```cpp= class Solution { public: int minOperations(vector<string>& logs) { int depth = 0; for (string log : logs) { if (log == "../") { depth = max(0, --depth); } else if (log != "./") { ++depth; } } return depth; } }; ``` - T: $O(n)$ - S: $O(1)$ :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up