Adnovum interview question

Write an array algorithm