Update backtracking/subset_sum.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Swastika Gupta 2021-07-07 08:46:26 +05:30 committed by GitHub
parent 5cd469a230
commit 36eebdd4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ static void test() {
// Test 4 // Test 4
std::cout << "4th test "; std::cout << "4th test ";
std::vector<int> array4 = {3, 3, 3, 3}; std::vector<int> array4 = {3, 3, 3, 3};
assert(backtracking::Subsets::subset_sum(6, array4) == assert(backtracking::subset_sum::subset_sum(6, array4) ==
6); // here we are expecting 6 subsets which sum up to 6 i.e. 6); // here we are expecting 6 subsets which sum up to 6 i.e.
// {(3,3),(3,3),(3,3),(3,3),(3,3),(3,3)} // {(3,3),(3,3),(3,3),(3,3),(3,3),(3,3)}
std::cout << "passed" << std::endl; std::cout << "passed" << std::endl;