From cd0575f81e5ca3c3d3e47d6a6ceb6479c7b0dfb5 Mon Sep 17 00:00:00 2001 From: bt3gl <138340846+bt3gl-google@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:58:03 -0700 Subject: [PATCH] Update binary_search.py --- sorting_and_searching/binary_search.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sorting_and_searching/binary_search.py b/sorting_and_searching/binary_search.py index f7a2255..f5df040 100644 --- a/sorting_and_searching/binary_search.py +++ b/sorting_and_searching/binary_search.py @@ -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 """