|
Algorithms_in_C++
1.0.0
Set of algorithms implemented in C++.
|
Fibonacci search algorithm More...
#include <iostream>#include <vector>#include <cassert>#include <cstdlib>#include <algorithm>Functions | |
| int | fibonacci_search (const std::vector< int > &arr, int value) |
| using fibonacci search algorithm finds an index of a given element in a sorted array More... | |
| bool | no_occurence_tests () |
| random tests for checking performance when an array doesn't contain an element | |
| bool | random_tests () |
| random tests which cover cases when we have one, multiple or zero occurences of the value we're looking for | |
| int | main () |
| int fibonacci_search | ( | const std::vector< int > & | arr, |
| int | value | ||
| ) |
using fibonacci search algorithm finds an index of a given element in a sorted array
| arr | sorted array |
| value | value that we're looking for |
| int main | ( | ) |
Main Function testing the algorithm