mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-23 08:51:31 -04:00
Update binary_search.py
This commit is contained in:
parent
e4bfc72334
commit
cd0575f81e
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# author: bt3gl
|
||||
|
||||
|
||||
def binary_search_recursive(array, item, higher=None, lower=0):
|
||||
|
||||
higher = higher or len(array)
|
||||
|
@ -30,6 +31,7 @@ def binary_search_iterative(array, item):
|
|||
lower=mid+1
|
||||
return False
|
||||
|
||||
|
||||
def binary_search_matrix(matrix, item, lower=0, higher=None):
|
||||
""" Binary search in a matrix """
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue