Problem statement: given a sorted array of n elements, write a function to search for the index of a given element (target)