Gainsight interview question

find element in sorted array