Google interview question

A four step question on a linear array