Remove deleted folders and their descendants from a path list
You get a list of hierarchical paths such as California, California/San Francisco and California/San Francisco/7th Street, and a list of paths to delete. Deleting a path removes it and everything under it. Return the paths that remain.
A trie keyed by path segment is a natural fit. Make sure a deleted path does not remove a sibling that only shares a prefix of characters (for example California/San versus California/San Francisco).
No answer yet. Write the first one; the best answer gets endorsed.
