SHARE
TWEET

Untitled

a guest Dec 10th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Given a list of directories L as a list of strings, output the list of directories that are not a subdirectory of some other directory in the list.
  2. e.g.
  3. Given
  4. D:\Documents\Books\Textbooks\Biology
  5. D:\Documents\Books\Textbooks\Math
  6. D:\Documents\Books\Comics
  7. D:\Photos\Vacations\ThemeParks
  8. D:\Photos\Vacations\DogParks
  9. D:\Documents\Books\Textbooks
  10. E:\Passwords\AllBankPasswordsInClearText
  11.  
  12. Return a list containing.
  13. D:\Documents\Books\Textbooks
  14. D:\Documents\Books\Comics
  15. D:\Photos\Vacations\ThemeParks
  16. D:\Photos\Vacations\DogParks
  17. E:\Passwords\AllBankPasswordsInClearText
  18.  
  19. Note that Textbooks\Biology and Textbooks\Math are both contained in D:\Documents\Books\Textbooks, so are therefore excluded from the output. No tricks or complications - e.g. no symlinks, hardlinks, aliasing, ..'s, etc etc etc. Treat them as strings
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top