2022-11-22 13:31:25 +00:00
|
|
|
#ifndef S0039_COMBINATION_SUM_HPP
|
|
|
|
#define S0039_COMBINATION_SUM_HPP
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <iterator>
|
2022-11-30 10:20:36 +00:00
|
|
|
#include <vector>
|
2022-11-22 13:31:25 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2022-11-30 10:20:36 +00:00
|
|
|
class S0039 {
|
2022-11-22 13:31:25 +00:00
|
|
|
public:
|
|
|
|
vector<vector<int>> combinationSum(vector<int>& candidates, int target);
|
2022-11-30 10:20:36 +00:00
|
|
|
void dfs(vector<int>& candidates, int target, vector<vector<int>>& ans,
|
|
|
|
vector<int>& combine, int idx);
|
2022-11-22 13:31:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|