Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1233. Remove Sub-Folders from the Filesystem
Given a list of absolute folder paths, return only the top-level folders by removing any path that is a subfolder of another. The core challenge is efficiently detecting when one path is a prefix followed by '/' of another (commonly solved with lexicographic sorting and prefix checks or a Trie).
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late April, 2025
Meta
Staff
Early September, 2024
Mid-level
Given an array of strings 'words', remove each word from the array that is a prefix of another word
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.