mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update exponential_search.cpp
This commit is contained in:
parent
5931f3d234
commit
3b6e05e68f
@ -45,12 +45,12 @@ template<class Type> Type* struzik_search(Type* array, size_t size, Type key) {
|
||||
return nullptr;
|
||||
}
|
||||
int main() {
|
||||
//TEST CASES
|
||||
// TEST CASES
|
||||
int *sorted_array = new int[7]{7, 10, 15, 23, 70, 105, 203};
|
||||
assert(struzik_search<int>(sorted_array, 7, 0) == nullptr);
|
||||
assert(struzik_search<int>(sorted_array, 7, 1000) == nullptr);
|
||||
assert(struzik_search<int>(sorted_array, 7, 50) == nullptr);
|
||||
assert(struzik_search<int>(sorted_array, 7, 7) == sorted_array);
|
||||
//TEST CASES
|
||||
// TEST CASES
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user