Verint interview question

Find the largest element in the given array, and asked to optimise it.