# fibonacci search Algorithm

If the components being searched have non-uniform access memory storage (i. e., the time needed to access a storage location vary depending on the location accessed), the Fibonacci search may have the advantage over binary search in slightly reduce the average time needed to access a storage location.
On average, this leads to about 4 % more comparisons to be executed, but it has the advantage that one only needs addition and subtraction to calculate the index of the accessed array components, while classical binary search needs bit-shift, division or multiplication, operations that were less common at the time Fibonacci search was first published.

### fibonacci search source code, pseudocode and analysis

If the item is less than entry Fk−1, discard the components from positions Fk−1 + 1 to n.(throughout the algorithm, p and q will be consecutive Fibonacci numbers)