From b57b6abb48c468c47b511de8613d2fdd20d5e07b Mon Sep 17 00:00:00 2001 From: Prashant Anand Date: Sat, 1 Aug 2020 14:26:04 +0900 Subject: [PATCH] fix doctests for recursive binary search (#2229) --- searches/binary_search.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/searches/binary_search.py b/searches/binary_search.py index 0d9e73025..d0f629616 100644 --- a/searches/binary_search.py +++ b/searches/binary_search.py @@ -261,16 +261,16 @@ def binary_search_by_recursion(sorted_collection, item, left, right): :return: index of found item or None if item is not found Examples: - >>> binary_search_std_lib([0, 5, 7, 10, 15], 0) + >>> binary_search_by_recursion([0, 5, 7, 10, 15], 0, 0, 4) 0 - >>> binary_search_std_lib([0, 5, 7, 10, 15], 15) + >>> binary_search_by_recursion([0, 5, 7, 10, 15], 15, 0, 4) 4 - >>> binary_search_std_lib([0, 5, 7, 10, 15], 5) + >>> binary_search_by_recursion([0, 5, 7, 10, 15], 5, 0, 4) 1 - >>> binary_search_std_lib([0, 5, 7, 10, 15], 6) + >>> binary_search_by_recursion([0, 5, 7, 10, 15], 6, 0, 4) """ if right < left: