mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 11:40:46 +08:00
fix: self-test example not working
This commit is contained in:
@@ -81,8 +81,9 @@ assert(backtracking::subset_sum::number_of_subsets(0, array1) ==
|
||||
3. Small C++ program that showcases and explains the use of tests.
|
||||
|
||||
```cpp
|
||||
#include <vector> /// for std::vector
|
||||
#include <cassert> /// for assert
|
||||
#include <iostream> /// for IO operations
|
||||
#include <vector> /// for std::vector
|
||||
#include <cassert> /// for assert
|
||||
|
||||
/**
|
||||
* @brief Verifies if the given array
|
||||
@@ -100,7 +101,7 @@ bool is_number_on_array(const std::vector<T> &arr, const int &number) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
// Number not in the current index, keep searching.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user