mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update interpolation_search.cpp
This commit is contained in:
parent
79df69d582
commit
c98405b3cb
@ -51,7 +51,7 @@ namespace search {
|
|||||||
* @param number value to be searched
|
* @param number value to be searched
|
||||||
* @returns integer index of `number` in vector `arr`
|
* @returns integer index of `number` in vector `arr`
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
uint64_t interpolationSearch(std::vector<uint64_t> &arr, uint64_t number) {
|
uint64_t interpolationSearch(const std::vector<uint64_t> &arr, uint64_t number) {
|
||||||
uint64_t size = arr.size();
|
uint64_t size = arr.size();
|
||||||
uint64_t low = 0, high = (size - 1);
|
uint64_t low = 0, high = (size - 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user