function minOperations(logs: string[]): number { let depth = 0; for(const log of logs) { switch(log) { case '../': if (depth > 0) depth--; break; case './': break; default: depth++; } } return depth; };