Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 522 Bytes

RECURSIVE_BINARY_SEARCH.md

File metadata and controls

11 lines (7 loc) · 522 Bytes

Recursive Binary Search

Modify Binary Search to use recursive method recursiveBinarySearch to perform a binary search of the array. The method should receive the search key, starting index and ending index as arguments. If the search key is found, return its index in the array. If the search key is not found, return –1.

Big O of the Recursive Binary Search

The recursive binary search algorithm runs in O(log n) time.