Subdirectory Deletion

Solve a medium-level problem of deleting subdirectories in a file system using tries.

Problem statement

Given a list of strings representing directory structures of a file system, delete all the subdirectories of the path mentioned in the list and return the list of directories that are left after the deletions.

Example 1

Sample input

Get hands-on with 1200+ tech skills courses.