A is a list of integers of length N where for any A[n] where 0<=n<N A[n] < A[n+1]. Write a binary search function to locate an index of given number in A or -1 if number is not existing in list.
For example:
>>> A = [1, 2, 5, 7, 9, 12, 15]
>>> print binary_search(5)
... 2
>>> print binary_search(6)
... -1