From dc1f0c4c0096013799416664894c5194dc7e1f52 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 28 Feb 2025 23:13:39 +0800 Subject: chore(store): move everything to store. --- works/solutions/leetcode/cpp/power-set-lcci.cpp | 29 ------------------------- 1 file changed, 29 deletions(-) delete mode 100644 works/solutions/leetcode/cpp/power-set-lcci.cpp (limited to 'works/solutions/leetcode/cpp/power-set-lcci.cpp') diff --git a/works/solutions/leetcode/cpp/power-set-lcci.cpp b/works/solutions/leetcode/cpp/power-set-lcci.cpp deleted file mode 100644 index f502e7c..0000000 --- a/works/solutions/leetcode/cpp/power-set-lcci.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include - -using std::vector; - -class Solution { -public: - void dfs(const vector &nums, int index, int size, vector ¤t, - vector> &result) { - if (index == size) { - result.push_back(current); - return; - } - - dfs(nums, index + 1, size, current, result); - - current.push_back(nums[index]); - dfs(nums, index + 1, size, current, result); - current.pop_back(); - } - - vector> subsets(vector &nums) { - vector current; - vector> result; - - dfs(nums, 0 , nums.size(), current, result); - - return result; - } -}; -- cgit v1.2.3