aboutsummaryrefslogtreecommitdiff
path: root/misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'misc.cpp')
-rw-r--r--misc.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/misc.cpp b/misc.cpp
deleted file mode 100644
index 8263244..0000000
--- a/misc.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-class Solution {
-public:
- vector<string> removeSubfolders(vector<string> &folder) {
- sort(folder.begin(), folder.end());
- vector<string> res;
-
- for (auto s : folder) {
- if (res.size() == 0) {
- res.push_back(s);
- continue;
- }
-
- string parent = res[res.size() - 1];
- if (s.substr(0, parent.size() + 1) != parent + '/')
- res.push_back(s);
- }
-
- return res;
- }
-};