35 int32_t nelement = in_arr.size();
36 uint64_t count_of_subset = 0;
38 for (int32_t i = 0; i < (1 << (nelement)); i++) {
40 for (int32_t j = 0; j < nelement; j++) {
49 return count_of_subset;
60 std::cout <<
"1st test ";
61 std::vector<int32_t> array1 = {-7, -3, -2, 5, 8};
65 std::cout <<
"passed" << std::endl;
68 std::cout <<
"2nd test ";
69 std::vector<int32_t> array2 = {1, 2, 3, 3};
73 std::cout <<
"passed" << std::endl;
76 std::cout <<
"3rd test ";
77 std::vector<int32_t> array3 = {1, 1, 1, 1};
81 std::cout <<
"passed" << std::endl;
84 std::cout <<
"4th test ";
85 std::vector<int32_t> array4 = {3, 3, 3, 3};
89 std::cout <<
"passed" << std::endl;
92 std::cout <<
"5th test ";
93 std::vector<int32_t> array5 = {};
97 std::cout <<
"passed" << std::endl;