Leetcode 1166. Design File System
Implement an in-memory hierarchical file system that supports createPath(path, value) — which should succeed only if the immediate parent path exists and the path is new — and get(path) returning the stored value or -1 if absent. The challenge is efficiently enforcing parent-existence and uniqueness checks for arbitrary path strings.
Asked at:
Uber

Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late July, 2025
Uber
Senior
Early April, 2025
Uber
Senior
Early October, 2024

Intern
Optimize the size calculation function if we query the same file system for multiple entity ids
Your account is free and you can post anonymously if you choose.