one pass of the array and the job is done