84 std::vector<std::vector<int>> custom_input_arr(3);
85 custom_input_arr[0] = std::vector<int>{1, -10, 2, 31, -6};
86 custom_input_arr[1] = std::vector<int>{2, 3, 4};
87 custom_input_arr[2] = std::vector<int>{0, 1, 0, 1, 0};
89 std::vector<int> custom_input_target_sum(3);
90 custom_input_target_sum[0] = -14;
91 custom_input_target_sum[1] = 10;
92 custom_input_target_sum[2] = 2;
95 std::vector<int> calculated_output(3);
97 for (
int i = 0; i < 3; i++) {
98 calculated_output[i] =
99 dynamic_programming::subset_sum::subset_sum_problem(
100 custom_input_arr[i], custom_input_target_sum[i]);
104 std::vector<bool> expected_output{
true,
false,
true};
109 for (
int i = 0; i < 3; i++) {
110 assert(expected_output[i] == calculated_output[i]);
113 std::cout <<
"All tests passed successfully!\n";