Simulate a File System with Access Control

Asked at Dropbox · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026

Given a file system represented as a `List<List<string>> folders` and a `HashSet<string> accesses`, implement a function `HasAccess(string folder)` to determine if a user has access to a specified folder. Access rights are inherited, meaning if a user can access a parent folder, they can also access the child folder.

Loading the problem…