leetcode/include/s0039_combination_sum.hpp
2022-11-30 18:20:36 +08:00

18 lines
377 B
C++

#ifndef S0039_COMBINATION_SUM_HPP
#define S0039_COMBINATION_SUM_HPP
#include <algorithm>
#include <iterator>
#include <vector>
using namespace std;
class S0039 {
public:
vector<vector<int>> combinationSum(vector<int>& candidates, int target);
void dfs(vector<int>& candidates, int target, vector<vector<int>>& ans,
vector<int>& combine, int idx);
};
#endif