Given a sorted array of signal frequencies, write an efficient search algorithm to locate a specific target frequency.
Implement the function below. Return the first index where target appears, or -1 if it is absent. The array may contain duplicate frequencies and must not be modified.
def search_frequency(frequencies, target):