You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
In computer science, the Fibonacci search technique is a method of searching a sorted array using a divide and conquer algorithm that narrows down possible locations with the aid of Fibonacci numbers. (Wikipedia)
4
+
##Install
5
+
6
+
```
7
+
pip install allalgorithms
8
+
```
9
+
10
+
##Usage
11
+
12
+
```py
13
+
from allalgorithms.searchesimport fibonacci_search
14
+
15
+
arr= [-2,1,2,7,10,77]
16
+
17
+
print(fibonacci_search(arr,7))
18
+
# -> 3
19
+
20
+
print(fibonacci_search(arr,3))
21
+
# -> None
22
+
```
23
+
24
+
##API
25
+
26
+
###fibonacci_search(array, query)
27
+
28
+
>Return array index if its found, otherwise returns`None`