Goldman Sachs interview question

Searching an element in an infinite array