We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa74e51 commit 447ee32Copy full SHA for 447ee32
pygorithm/searching/binary_search.py
@@ -23,16 +23,10 @@ def search(List, target):
23
24
25
# time complexities
26
-def bestcase_complexity():
27
- return 'O(1)'
+def time_complexities():
+ return '''Best Case: O(1), Average Case: O(logn), Worst Case: O(logn)'''
28
29
-def averagecase_complexity():
30
- return 'O(logn)'
31
-
32
-def worstcase_complexity():
33
34
35
-# easily retrieve the source code of the sort function
+# easily retrieve the source code of the search function
36
def get_code():
37
import inspect
38
return inspect.getsource(search)
0 commit comments