Untitled
Anonymous
plain_text
05/22/2023 7:23 AM
612 B
30
Indexable
'''
Searches an element in a sorted array using Binary Search algorithm
Parameters:
arr (list): A sorted list of integers where the element is to be searched
low (int): The lowest index of the list from where to start the search
high(int): The highest index of the list till where to perform the search
x (int): The element to be searched in the list
Returns:
The index of the element if present in the list else -1
Raises:
None
'''Editor is loading...