Implement deleteDirectory in a Virtual File System
Asked at Google · Coding Questions · Difficulty: Medium
You are implementing a virtual file system. There is a method `list(path)` that returns all direct child paths under `path` (each child may be a file or a directory). Implement `deleteDirectory(path)` that recursively deletes the directory at `path` and all of its contents (files and subdirectories).
Loading the problem…
More Google interview questions
- LLM conceptual questions
- Implement a Nested Tic-Tac-Toe Game Engine
- ML Fundamentals Deep Dive (AI/ML & MLE Roles)
- Design a Real-Time Product Recommendation System
- Implement Scaled Dot-Product Attention
- Design a Multi-Tenant, Multi-Region API Rate Limiter