Amazon interview question

Search element in an array