Binary Search in Python

The binary search is an excellent algorithm to find an item in a sorted list, being O(Log n) it is very efficient. This is an implementation in Python: Essentially it works like this: start with low set to the first item, high to the last, index to the middle if the item at the index […]