paths. If a folder sits inside another folder from the same list, there is no need to back it up separately: it gets copied anyway.
Folder b is inside folder a if the path b starts with a immediately followed by /. For example, /x/y is inside /x, but /xy is not.
Each path is one or more pieces of the form / + a non-empty name made of lowercase English letters, digits and _. All paths are distinct.
Return the folders from the list that are not inside any other folder of the list, in any order.paths=['/home/anna', '/srv', '/home/anna/music', '/srv/www/static', '/home/bob'] → ['/home/anna', '/home/bob', '/srv']
/home/anna/music is inside /home/anna and /srv/www/static is inside /srv, so both go.
paths=['/log', '/logs', '/log/old'] → ['/log', '/logs']
/logs starts with /log, but it is a different folder, not a nested one: a nested path continues with /.
_ and /, start with / and do not end with itpaths=['/home/anna', '/srv', '/home/anna/music', '/srv/www/static', '/home/bob']
['/home/anna', '/home/bob', '/srv']
Run checks the first 3 tests in your browser. Submit checks all 92 tests on the server, hidden ones included.