← ALL NOTES
Array

1233. Remove Sub-Folders from the Filesystem

Given folder paths, remove all sub-folders, keeping only the top-level ones (a folder is a sub-folder if its path starts with a parent's path plus a /). The key enabler is lexicographic sorting:…

Loading…